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!

help with if function

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi I have not programmed with nawk for over 5 years and I can not remember even the simplist commands... here goes.

I have a file like this...

AAAAAA 041001
BBBBBB 041101
etc...

I need to eliminate all lines with the second column less than, say 041001. I would like to set this up with an input and output file.

Thanks in advance...

Shawn
 

Hi, shawn71!

Please, try this awk command:

awk '$2 >= 041001' inputfile > outputfile

Bye!

KP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top