11 lines
224 B
Bash
11 lines
224 B
Bash
|
awk '{
|
||
|
if ($1 == "FIND")
|
||
|
regex = $2
|
||
|
else {
|
||
|
where = match($0, regex)
|
||
|
if (where != 0)
|
||
|
print "Match of", regex, "found at", \
|
||
|
where, "in", $0
|
||
|
}
|
||
|
}'
|