[Openvpn-devel] Add missing (but optional) escape backslash to sed replace string

Message ID 20180413152915.7940-1-simon@rozman.si
State Changes Requested
Headers show
Series
  • [Openvpn-devel] Add missing (but optional) escape backslash to sed replace string
Related show

Commit Message

Simon Rozman April 13, 2018, 3:29 p.m.
---
 dev-tools/lz4-rebaser.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gert Doering April 13, 2018, 3:37 p.m. | #1
Hi,

On Fri, Apr 13, 2018 at 05:29:15PM +0200, Simon Rozman wrote:
>  #ifdef NEED_COMPAT_LZ4
>  EOF
> -    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

Patch

diff --git a/dev-tools/lz4-rebaser.sh b/dev-tools/lz4-rebaser.sh
index 03debcb..3771639 100755
--- a/dev-tools/lz4-rebaser.sh
+++ b/dev-tools/lz4-rebaser.sh
@@ -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