Setting up automatic download

Stephen R Laniel steve at laniels.org
Wed Aug 24 19:40:41 UTC 2005


On Wed, Aug 24, 2005 at 03:32:43PM -0400, Alvin Thompson wrote:
> cd /tmp && wget http://www.apache.org/foundation/preFAQ.html && cat 
> preFAQ.html | mail -s "subject (new web page)" me at mydomain.com

Both the people who've responded so far have had the right
idea, but I'd just suggest some shortening*. The big lesson
to keep in mind is that nearly every Unix command-line app
worth its salt allows you to give it input through standard
in and get output on standard out. In wget's case, if you
want to dump the contents of a page to stdout, you do

wget -O - http://example.com/foo

where '-' is the near-universal Unix shorthand for 'standard
out'. So you can reduce the command line above to

wget -O - http://www.apache.org/foundation/preFAQ.html 2>/dev/null |mail -s "subject (new web page)" me at mydomain.com

I hope that helps.

* - Not Crisco. More like "efficiencies."

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050824/b2469bc8/attachment.sig>


More information about the ubuntu-users mailing list