« Contemporary Sci-Fi | Main | Laziness or lobotomy? »

Using wget to download a URL stored in the clipboard

Here is an alias used to quickly download a link using wget:

alias cget 'pbpaste | wget -i -'

pbpaste is a Mac OS X only command line utility that prints the clipboard to the standard output. wget’s -i option tells it to read URL(s) from a file, and - makes it use the standard input in place of a file.

To use it, copy a URL, open a new Terminal window and type cget. Download should begin, with all of wget’s great features like perseverence and robustness.

This technique will be improved in an upcoming article has been used by yours truly for almost a year and a half without feeling the need for improvement.

TrackBack

TrackBack URL for this entry: https://ithink.ch/blog/tb.cgi/79.

Make sure JavaScript is enabled before using this URL. If you would like to ping my blog but can't, please do send me an e-mail at os3476 at this domain.

Post a comment

Make sure JavaScript is enabled before posting a comment. If you would like to post a comment but can't, please do send me an e-mail at os3476 at this domain.

Do not meddle in the affairs of Coding Ninjas, for they are subtle and quick to anger.