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

Awk Command 1

Status
Not open for further replies.

lambros

Programmer
Oct 10, 2002
42
0
0
US
req x2/f0909 > 111


Hi,

Does anyone know the command I can use to get this value above? I've tried;

if ( $0 ~ /req[ <tab>]*>[ <tab>]*208/ ){

but I think it doesn't get it out because of the characters, is there some wild card I can use in awk for this, I need a wild card as the x2/f0909 is a session ID.

Lambros.
 
awk ' {
if (match($0,/req[\t ]x[0-9]\/.[0-9]+[\t ]\x3E[\t ][0-9]+.*/)) {
print RSTART , RLENGTH ; print substr($0,RSTART,RLENGTH - RSTART - 2)
}
}'

OP:
9 29
req x2/f0909 > 111
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top