Newsgroups: alt.uu.comp.os.linux.questions,comp.os.linux.questions,comp.os.linux.help Subject: Re: Script help needed. From: nospam@magma.ca (Rob Kroll) References: <3A4F90BA.7D4FA443@hotmail.com> <3A4F9581.E44CC415@hotmail.com> Message-ID: Date: Tue, 02 Jan 2001 00:53:01 GMT Organization: Magma Communications Ltd. David wrote in <3A4F9581.E44CC415@hotmail.com>: >Oooops! Figured it out I had missed the
in the echo line. > >#!/bin/sh ># >for f in `cat ~/mytmp` ;do >echo "$f
" \ >| /usr/bin/tee -a ~/mytest1.html ; >done > > As near as I can tell, neither of these could work quite right. At least, neither of them would be all that clean, from an HTML standpoint. (IOW, your HTML skills appear lacking. While it will work, it is less graceful than it could be, and some lower quality browsers will cack when they see it.) Also, it would appear from your scripts that you're overwriting ~/mytest1.html with every line. (I'm not entirely sure here, as I'm much more used to MSDOS syntax than Linux syntax, but the echo command is pretty much universal.) You should be appending, instead. Try instead: #!/bin/sh # clear the original. echo '' > ~/mytest1.html; #as a table isn't needed, you can just have a link on each line. #do that now. for f in 'cat ~/mytmp' ;do echo '$f
' >> ~/mytest1.html; done; or: #!/bin/sh #clear the original. echo '' > ~/mytest1.html; #set up the table echo '' >> ~/mytest1.html; #add each line in the table for f in 'cat ~/mytmp' ;do echo '' >> ~/mytest1.html; done; #close the table. For some browsers. echo '
$f
' >> ~/mytest1.html;