mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-14 06:05:22 +01:00
Better handling around grep/awk
This commit is contained in:
committed by
Lukas Schauer
parent
6ee4ae508e
commit
71f6bc617e
@@ -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:]"\\]'
|
||||
|
||||
Reference in New Issue
Block a user