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 <<!EOF
16,20d
5,10d
w
q
!EOF


Note that you need to work backwards so the line numbers don't change.

-- 
"Exhilaration is that feeling you get just after a great idea hits you,
and just before you realize what's wrong with it."
                -- Anonymous
    Rick Pasotto    [EMAIL PROTECTED]    http://www.niof.net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to