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

Re: looking for a piece of software that will take an url (say to a blog post) and email me the contents



On Sat, Nov 05, 2016 at 03:01:14PM -0700, Dan Hitt wrote:
> Does anybody know of a piece of software that you can give an URL to,
> and it will then fetch the url and email the contents to you?

#!/bin/sh
# Usage: scriptname URL recipient [...]
url=$1
shift
lynx -dump "$url" | mail -s "Web page: $url" "$@"


Of course, much depends on what you mean by "contents".  I'm assuming
you want a plain text rendering, which is what lynx -dump does.  Then
again, I'm old-fashioned, and I consider HTML email one of the signs of
the apocalypse.  If you actually *want* HTML email, then maybe you
would prefer some different solution.

You could also get fancy and have the script use the EMAIL environment
variable as the recipient, etc.  It's up to you.


Reply to: