Unix/Linux Go Back    



delete first 100 lines from a file

Solaris




Kindly Note - This is a Single User Post by Forum Member libin4u2000 Regarding:
delete first 100 lines from a file.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 06-09-2009
libin4u2000 libin4u2000 is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 30 November 2009, 9:55 PM EST
Location: Singapore
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
delete liines using sed.

Hi,

I am trying to delete all lines in a file which starts with SG.

Command : sed -e "s/^SG/d/" bcpfile > test1.

But the above command just replaces 'SG' with 'd'. Please suggest the correct command to delete the whole line.

Thanks.
David.