Re: wget question..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

There is an easy way:

wget somefile

cat somefile >> filetoappendto

If you want to do it automatically, then use the following

wget somefile --output-document=/tmp/wgetbuffer & cat /tmp/wgetbuffer >> 
filetoappendto & rm /tmp/wgetbuffer

all of it on one line in a script or on the commandline

How does this work?

The system executes the first command, and if it succeeds (errorlevel 0), then 
it will execute the second, and so on.  This is handled by the ampersand 
operator

the instruction cat /tmp/wgetbuffer >> filetoappendto will copy the downloaded 
file and add it to the end of the already existing file filetoappendto.
Note that > is not the same as >>.  The > means replace contents or create 
file, and the >> means add contents or create file.

Hope this helps


With kind regards



Andy



On Thursday 11 August 2005 23:37, bruce wrote:
> is there an easy way to do a wget, and have the results appended to a file.
> (an existing file?)
>
> couldn't figure it out from the manpages...
>
> thanks
>
> -bruce

-- 
Registered Linux User Number 379093
Now listening to Top! Radio Live Stream: mms://broadcast.ionip.be/topradioHigh

   amaroK::the Coolest Media Player in the known Universe!


   Cockroaches and socialites are the only things that can 
   stay up all night and eat anything.
					    Herb Caen
--
-- --BEGIN GEEK CODE BLOCK-----
Version: 3.1
GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C++++$(+++) UL++++>++++$ P-(+)>++
L+++>++++$ E---(-)@ W+++>+++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e>++++$@ h++(*) r-->++ y--()>++++
-- ---END GEEK CODE BLOCK------
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/

--

Attachment: pgpzh486qXuBl.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux