Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search using a parsed value

Status
Not open for further replies.

ranjit

Technical User
Apr 14, 2000
131
GB
Hi,

Using the notation: nawk -v VAL=$REGEXP awk.script datafile

can I search the contents of the datafile for the VAL variable. If so, what is the syntax?

$0 ~/VAL/ {print $0}

Surely the above is searching for the string "VAL" ???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top