Re: removing lines from a file

2002-11-04 Thread David Z Maze
Lance Hoffmeyer <[EMAIL PROTECTED]> writes: > I know this has come up before but what is the best > way to remove lines 5-10 and lines 16-20 from > a file using the console and a batch file? I'd just use sed: sed -e 5,10d -e 16,20d input-file -- David Maze [EMAIL PROTECTED] http:

Re: removing lines from a file

2002-11-02 Thread Rick Pasotto
On Sat, Nov 02, 2002 at 02:19:38PM -0600, Lance Hoffmeyer wrote: > I know this has come up before but what is the best > way to remove lines 5-10 and lines 16-20 from > a file using the console and a batch file? In place? Put the following in a batch script: #!/bin/bash ed $1

Re: removing lines from a file

2002-11-02 Thread Jason Pepas
On Saturday 02 November 2002 02:29 pm, Jason Pepas wrote: > On Saturday 02 November 2002 02:19 pm, Lance Hoffmeyer wrote: > > I know this has come up before but what is the best > > way to remove lines 5-10 and lines 16-20 from > > a file using the console and a batch file? > > > > Lance > > you co

Re: removing lines from a file

2002-11-02 Thread Jason Pepas
On Saturday 02 November 2002 02:19 pm, Lance Hoffmeyer wrote: > I know this has come up before but what is the best > way to remove lines 5-10 and lines 16-20 from > a file using the console and a batch file? > > Lance you could use wc to get the total number of lines, and then use head and tail

removing lines from a file

2002-11-02 Thread Lance Hoffmeyer
I know this has come up before but what is the best way to remove lines 5-10 and lines 16-20 from a file using the console and a batch file? Lance -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]