Better handling around grep/awk

This commit is contained in:
Brian Bennett
2021-09-20 15:25:18 -07:00
committed by Lukas Schauer
parent 6ee4ae508e
commit 71f6bc617e

View File

@@ -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:]"\\]'