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

replace regexp constant for command line variable 2

Status
Not open for further replies.

martincab

Programmer
May 12, 2003
39
US
I want to replace the regexp constant "HIS" for a command line variable in the following script:

$0 ~ /HIS[[:alpha:]]/

Thanks for any tek-tip.


Martin Cabrera
Oracle dba
 
RE=HIS "[[:alpha:]]"

$0 ~ RE

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
pattern="HIS"[tt]
awk '$0 ~ /'"$pattern"'[[:alpha:]]/' /path/to/input[/tt]


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top