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 ____________________________________________________
