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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/variable-name/

Status
Not open for further replies.

scor6800

Programmer
Oct 9, 2007
5
GR
Hi,
I call an awk program passing a param from command-line.
I want to see if a line from my input filename suits to the passing variable.
I can't use
$0 ~ /varname/ {...}
because awk understands varname as a string.
Any ideas?
 
And this ?
$0 ~ varname {...}

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yes, it did work!
I thought that "~" goes always with /.../.
Thanks PHV.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top