remove lines from file

file:

1 xxxxxxx
2 xxx xxx
5 xxx xxx
...
180 xxxxxx
200 xxx

how to remove any lines with the first number range 1-180

nawk '$1 > 180' myFile

thanks!

Sorry I over simplified it - the file has other part, such as comments... or lines not starting with number which should not be removed....

I modified your solution to:
nawk '$1 < 1;$1 > 180' myFile

it seems to work but not sure if it is safe enough.....

any comments would be appreciated!

quote a representative sample of your file, pls!

Here is a sample of the file in question:

#---------------------------------
# File opened Nov 08 17:15:00 2007
#---------------------------------
$1
#
# aseLines.cfg: line --> application database
#
# This file was generated by SRP on Nov 08 17:15:00 2007
#
#
# Line Node Application User
#

240 - nmsipmwi peri
241 - nmsipmwi peri
260 - dbserver peri
261 - dbserver peri
262 - dbserver peri
263 - dbserver peri
264 - dbserver peri
243 - nmsipmwi peri
244 - nmsipmwi peri
271 - email_worker peri
272 - email_worker peri
1 - appserver2 root
2 - appserver2 root
3 - appserver2 root
18 - appserver2 peri
19 - appserver2 peri
15 - appserver2 peri
16 - appserver2 peri
17 - appserver2 peri
6 - appserver2 peri
7 - appserver2 peri
8 - appserver2 peri
38 - appserver2 peri
39 - appserver2 peri
40 - appserver2 peri
238 - appserver2 peri

nawk '$1 ~ /^[0-9]+$/ && $1 > 180' myFile

strange enough, it doesn't work- it filters out all the comments line- although they are none-digit - any explain why? I'm on SunOS

sorry - misread your original requirement!

nawk '$1 ~ /^[^0-9]+$/ || $1 > 180' myFile

oh well, I'd have figured it out:rolleyes: must have been falling asleep;-)

Thank you so much!

This one should be ok.

awk '$1>180 || $1+0==0' filename