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!

Multiple AWK statements into one... 1

Status
Not open for further replies.

jdespres

MIS
Aug 4, 1999
230
US
I use awk to select, filter, and add...

1: Select all lines with columns greater than 12..

awk '{ if (NF > 12) print}'

2: From these lines print only lines that have the proper "mm/dd/yy"..

awk '$7== "'mm/dd/yy'" {print}'

3: Ok... now from the line that fall out from this I only want lines with server name...

awk '$7== "'Server_name'" {print}'


How would I include all these awk statements into one?

Thanks...

Joe Despres
 
So, $7 is mm/dd/yy and Server_name at the same time ?
Anyway, in the awk man page have a look at the && operator.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top