Re: pipe multiple pages in lynx



Kenny McCormack wrote:

> In article <XaidnX9hYaTdMl3enZ2dnUVZ_sWdnZ2d@xxxxxxx>,
> matt_left_coast <not@xxxxxxxxxx> wrote:
>>sheller wrote:
>>
>>> I wish to add the contents of the follwing two or many
>>> pages into one (say through piping) at one
>>> stroke, without storing in any temporary file.
>>> Any idea please? Thanks.
> ...
>>#!/bin/bash
>>lynx -dump http://www/stocks/a.htm > out.file
>>lynx -dump http://www/stocks/b.htm >> out.file
>>lynx -dump http://www/stocks/c.htm >> out.file
>
> What part of "without storing in any temporary file" is causing you
> trouble?

Dude, If he wants to send the output to the screen, his script would do
exactly what he wanted, so he is obviously NOT asking to send it to the
screen. Try it.

Then, ever think there might be a difference between a temp file and an
output file? You know `cat tempfile1 tempfile2 > output file; rm -rf
tempfile*`????? The "temp" file is only used to create the concatenated
final output file which is not actually "temporary". Gee, guess that is
over your head.

Thus, it is logical that he is asking to send the output to a file, else why
bother asking the question? Since his script would indeed work if all he
wanted was outputting to the screen, I am assuming he is trying to avoid
something like:

lynx -dump http://www/stocks/a.htm > tmpfile1.file
lynx -dump http://www/stocks/b.htm > tmpfile2.file
lynx -dump http://www/stocks/c.htm > tmpfile3.file

cat tempfile* > archivefile.save

rm -rf tempfile*

Where temp files are actual TEMPORARY and the output file is NOT considered
"temporary" but rather as a final data file.

Gezzz.

--


.



Relevant Pages

  • Re: [PHP] Re: Hack question
    ... I assume using a php script because the owner is ... It would be nice to know if there is a CMS involved. ... That uploaded file is a temp file and gets deleted at the end of the script execution. ... "Some men are born to greatness, some achieve greatness, ...
    (php.general)
  • Re: TIP #210: Add tempname Subcommand to file
    ... > get an open temp file would be... ... > load $fname myPkg ... while we still write to it and before we get to [load] ... nothing we could possibly defend the script from, ...
    (comp.lang.tcl)
  • Scripting Help
    ... some of you more experienced script writers ... # WRITING COMMAND PARAMETERS TO TEMP FILE WHILE READING THE ... I have used the temp file as a means to expand the variables as the ... My problem is that when I try to cat utemp5 and pipe it to ksh that I ...
    (comp.unix.aix)
  • Re: Scripting Help
    ... some of you more experienced script writers ... > # WRITING COMMAND PARAMETERS TO TEMP FILE WHILE READING THE ... > I have used the temp file as a means to expand the variables as the ... > My problem is that when I try to cat utemp5 and pipe it to ksh that I ...
    (comp.unix.aix)
  • Re: redirect for stdout in ${command_line}
    ... echo "Command line is shown below:" ... # END OF SCRIPT# ... I would accept a variable and build a command line while ... echo "Temp file contents are shown below:" ...
    (comp.unix.aix)