Ah, but in your original post you said "remove".  None of
the suggestions you received removed the lines; they just
copied them to a different file.

This is kinda like in the status line of some browers where
it says "Transfering data from http://www.mydomain.com";.  It's
not transfering, it's coping.  Transfering data implies the 
removal of the data from the original site after downloading.

"Transfering files from the CD".  lol

Bill


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of magnet
> Sent: Tuesday, June 15, 2004 8:46 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [newbie] automatic batch editing of files
> 
> 
> On Tuesday 15 Jun 2004 9:09 am, Richard Urwin wrote:
> > On Tuesday 15 Jun 2004 4:11 am, Mikkel L. Ellertson wrote:
> > > David E. Fox wrote:
> > > > On Mon, 14 Jun 2004 16:14:04 +0100
> > > >
> > > > magnet <[EMAIL PROTECTED]> wrote:
> > > >>each file and then save each with a ".txt" suffix. Where do I start
> > > >>with this?
> > > >
> > > > Since the # of lines you want to remove are known, I'd suggest
> > > > using the script, but use 'head' and or 'tail'. Those are designed
> > > > for this purpose. sed will work too, but is more generalized. But,
> > > > automation via a for loop is what you're looking at doing.
> > > >
> > > > i.e. 'head -17 file0000.htm' would print all but the first 17 lines
> > > > of the file.
> > >
> > > This does not work in 9.2 - it gives you the first 17 lines.  Also
> > > tail -17 gives you the last 17 lines.  Now, tail +17 will give you
> > > all but the first 17 lines.  Too bad head +17 does not work.
> > >
> > > Mikkel
> >
> > According to the man page, tail +17 does what you want head +17 to do.
> > Not intuitive. I suggest you re-try the test that you ran above.
> 
> I have tried this under 9.2 and it works fine. Thanks to all that helped.
> 
> cd to the directory containing the files to be converted, then issue this 
> command:
> 
> tail +5 original_file.htm >> new_filename.txt
> 
> Worked a treat, so I will be making back-ups first <g> just in case and 
> running Mikkels' script.
> 
> magnet
> :)
> 
> 
> 


____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to