Skip to content

Instantly share code, notes, and snippets.

@radamant
Created November 1, 2016 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radamant/b7f9b249de4ba429e2d8f1d4a0998c8c to your computer and use it in GitHub Desktop.
Save radamant/b7f9b249de4ba429e2d8f1d4a0998c8c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
url=$1
filename="${url##*/}"
kindlemail=xxxx@kindle.com
if [ -z $filename ]
then
echo "A file name must be specified at end of URL"
fi
curl $url > /tmp/$filename
echo "A kindle attachment for you to read " | mutt -a /tmp/$filename -s "Read this attachment" -- $kindlemail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment