From: Brian Bennett Date: Mon, 20 Sep 2021 22:25:18 +0000 (-0700) Subject: Better handling around grep/awk X-Git-Tag: v0.7.1~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71f6bc617e7c8a41d17aa55d5e85c460a4578bbd;p=thirdparty%2Fdehydrated.git Better handling around grep/awk --- diff --git a/dehydrated b/dehydrated index 9c1de44..601273f 100755 --- a/dehydrated +++ b/dehydrated @@ -88,7 +88,7 @@ jsonsh() { awk_egrep () { local pattern_string=$1 - gawk '{ + awk '{ while ($0) { start=match($0, pattern); token=substr($0, start, RLENGTH); @@ -110,7 +110,7 @@ jsonsh() { GREP='egrep -ao' fi - if echo "test string" | egrep -o "test" >/dev/null 2>&1 + if echo "test string" | egrep -ao "test" >/dev/null 2>&1 then ESCAPE='(\\[^u[:cntrl:]]|\\u[0-9a-fA-F]{4})' CHAR='[^[:cntrl:]"\\]'