From 5ca12d8332f82afd5df9df7a9894d291a5e1c884 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Tue, 24 Jul 2018 20:19:05 +0800 Subject: [PATCH] avoid extended regex features to avoid caring about sed -r vs -E --- ifndef_wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifndef_wrapper.sh b/ifndef_wrapper.sh index e2545d4..37a208d 100755 --- a/ifndef_wrapper.sh +++ b/ifndef_wrapper.sh @@ -2,6 +2,6 @@ # Wrap all "#define X Y" with a #ifndef X...#endif" -sed -E 's/^( *#define ([^ ]+) .*)/#ifndef \2\ +sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\ \1\ #endif/'