commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Ever wanted to stream your favorite podcast across the network, well now you can.
This command will parse the iTunes enabled podcast and stream the latest episode across the network through ssh encryption.
Aside from curl one will need iconv windows binary since windows lacks a native utf-8 cli interface. In my case I need a proxy in China and iconv to convert gbk status string into utf-8. GnuWin32 is a good choice with loads of coreutils natively ported to Windows
"FOR /f" is the solution to pass iconv output to curl.
Query the Socrata Open Data API being used by the White House to find any employee's salary using curl, grep and awk.
Change the value of the search parameter (example uses Axelrod) to the name of any White House staffer to see their annual salary.
Curl is not installed by default on many common distros anymore. wget always is :)
wget -qO- ifconfig.me/ip
If curl isn't available, use lynx.
With a lolcat favicon if you access it from your browser
Instead of having someone else read you the Digg headlines, Have OSX do it. Requires Curl+Sed+Say. This could probably be easily modified to use espeak for Linux.
In this example we search for 'vim' but vim doesn't have a project on github right now. That's ok, this command still searches for every project that has 'vim' in their description (forks, plugins, etc). To get XML or JSON output just replace 'yaml' in the url with 'xml' or 'json'.
Searches for web radio by submitted keyword and returns the station name and the link for listing .
May be enhanced to read user's selection and submit it to mplayer.
There's another version on here that uses GET but some people don't have lwp-request, so here's an alternative. It's also a little shorter and should work with most youtube URLs since it truncates at the first &
Request all information about my IP address in json format
Request all information about my IP address in xml format
you can use xmlstarlet to parse output instead of perl
This will tell you which twitter user you are chronologically. For example, a number of 500 means you were the 500th user to create a twitter account.
should be very consistent cause it's google :-)
use curl and sed to shorten an url via goo.gl
Validates and pretty-prints the content fetched from the URL.
This will send the web page at $u to email@example.com . To send the web page to oneself, firstname.lastname@example.org can be replaced by $(whoami) .
The "charset" is UTF-8 here, but any alternative charset of your choice would work.
`wget -O - -o /dev/null $u` may be considered instead of `curl $u` .
On some systems the complete path to sendmail may be necessary, for instance /sys/pkg/libexec/sendmail/sendmail for some NetBSD.