Re: Removeing N lines from a file

1999-02-13 Thread Jiri Baum
Lance Hoffmeyer: > How can I use gawk or some other program to remove a number of lines > from a text file. Initially, I only need to delete the top 10 lines > from a file As others already wrote, use tail +11 > but it might be useful to know how to delete lines from any part of the > f

Re: Removeing N lines from a file

1999-02-12 Thread William Park
On Wed, 10 Feb 1999, Lance Hoffmeyer wrote: > How can I use gawk or some other program to remove a number of lines > from a text file. Initially, I only need to delete the top 10 lines > from a file but it might be useful to know how to delete lines from any > part of the file. The top 10 line

Re: Removeing N lines from a file

1999-02-12 Thread Daniel Martin
Lance Hoffmeyer <[EMAIL PROTECTED]> writes: > How can I use gawk or some other program to remove a number of lines > from a text file. Initially, I only need to delete the top 10 lines > from a file but it might be useful to know how to delete lines from any > part of the file. The top 10 lines

Re: Removeing N lines from a file

1999-02-11 Thread P Asokan
I am a little rusty, but I think a pipe with head and tail may do what you want head -n < file will display/select the first n lines tail -n /tmp/x1 tail +$2 >/tmp/x2 cat /tmp/x1 /tmp/x2 These three lines can be made into a sheel script and the file you want to do surgery can be redirected to i

Re: Removeing N lines from a file

1999-02-11 Thread Jim Foltz
Try: sed '1,10d' filename > newfile -- Jim Foltz <[EMAIL PROTECTED]> ACORN techie AOL/IM jim_foltz