in my dream.

However anyway, I can use this one-liner to accomplish the most frequently used action with wget and curl:

python -c "url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz'; import urllib; open(url.split('/')[-1], 'wb').write(urllib.urlopen(url).read())"

Just replace the url string as you wish.

Update:

This could be a better version:

python -c "import urllib, sys; open(sys.argv[1].split('/')[-1],'wb').write(urllib.urlopen(sys.argv[1]).read())" http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz
Posted by yungyuc at 14:43, 0 comment, 0 trackback.
Navigate
Add a trackback
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "uYaUL"
© hover year to navigate month: powered by django