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!

using > 1

Status
Not open for further replies.

SpongeBob1

Programmer
Mar 1, 2002
49
0
0
US
Hi all,

I wish to write an awk script however for now all I need to do is get the line with the following character - it occurs often... the line is

200 > 120

however awk does not allow me use /200 > 120/ or /200 && 120/ do not work.... anyone have any ideas how to get these lines out?
 

awk '/200 > 120/' input-file

should work if there is exactly one space on either side of the greater than sign. If there are multiple spaces and/or tabs, you will need something like

awk '/200[ <tab>]*>[ <tab>]*120/' input-file

where <tab> is the tab character. CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top