Skip to contentSkip to conversation

Add missing (but optional) escape backslash to sed replace string

PATCH In review Simon Rozman 2 participants 2 messages Apr 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing (but optional) escape backslash to sed replace string

---
 dev-tools/lz4-rebaser.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
dev-tools/lz4-rebaser.sh +1 -1
index 03debcb..3771639 100755
@@ -58,7 +58,7 @@ echo "* Porting upstream lz4.c to compat-lz4.c"
 
 #ifdef NEED_COMPAT_LZ4
 EOF
-    sed 's/\"lz4\.h\"/\"compat-lz4.h"/' "$LZ4_C"
+    sed 's/\"lz4\.h\"/\"compat-lz4.h\"/' "$LZ4_C"
 cat <<EOF
 #endif /* NEED_COMPAT_LZ4 */
 EOF
Signature · 1 line
2.9.0.windows.1
#1 lore raw

Hi,

dev-tools/lz4-rebaser.sh echo "* Porting upstream lz4.c to compat-lz4.c" · line 61

Quoted 4 lines · Simon Rozman

#ifdef NEED_COMPAT_LZ4
EOF

dev-tools/lz4-rebaser.sh +1 -1
-    sed 's/\"lz4\.h\"/\"compat-lz4.h"/' "$LZ4_C"
+    sed 's/\"lz4\.h\"/\"compat-lz4.h\"/' "$LZ4_C"

TBH, I think all the backslashes before a double quote (") should *go*.

Nothing special about a " inside(!) ''... - neither the shell cares nor sed (unlike '.').

So, NAK.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...