regex - Fitting in this awk statement -


i have bash script working on calls awk script. line of code:

awk -f /home/rkahil/bms/parse.awk $filename.tmp > $filename | /..,[a-z][a-z]/ $filename

i know syntactically worng, need following regex expression /..,[a-z][a-z]/ $filename syntactically wrong need fit in statement , not quite sure how to. have suggestions?

i'm assuming need add last regex awk script without modifying awk script. need edit question , provide clear statement of requirements. see https://stackoverflow.com/help/asking

this may gnu awk feature, can provide multiple -f options concatenates named awk script one. thus:

awk -f /home/rkahil/bms/parse.awk \     -f <(echo 'filename ~ /..,[a-z][a-z]/') \     $filename.tmp > $filename 

demo:

$ cat foo.awk /foo/ {print} $ cat bar.awk  /bar/ {print} $ awk -f foo.awk -f bar.awk -f <(echo '/baz/ {print}') <<end blah foo hello world  var bar car 1234 ab cbazdef bye end 
foo var bar car ab cbazdef 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -