]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
Better handling around grep/awk
authorBrian Bennett <bahamat@digitalelf.net>
Mon, 20 Sep 2021 22:25:18 +0000 (15:25 -0700)
committerLukas Schauer <lukas@schauer.dev>
Sun, 31 Oct 2021 18:17:49 +0000 (19:17 +0100)
dehydrated

index 9c1de44c9064ee66e5e28845c06bc276834d1e81..601273f37d49a5b68480f027ac248347db25a53e 100755 (executable)
@@ -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:]"\\]'