Commands by fanfani (2)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

get detailed info about a lan card on HP-UX 11.31

floating point operations in shell scripts
using bc is for sissies. dc is much better :-D Polish notation will rule the world...

Send email with curl and gmail
Required curl version >=7.21; using ~/.netrc for authorization

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Append stdout and stderr to a file, and print stderr to the screen [bash]
Useful for cron jobs -- all output will be logged but only errors will cause email to be sent. NB the order of "2>&1" and ">> logfile" is important, it doesn't work if you reverse them (everything goes to the logfile, nothing left for tee).

Runs previous command but replacing
Replaces the first instance of 'foo' with 'bar'. To replace all instances of 'foo' with 'bar': !!:gs/foo/bar/

record the input of your sound card into ogg file
save the input into a ogg file

Extract title from HTML files
Case Insensitive! and Works even if the "<title>...</title>" spans over multiple line. Simple! :-)

Most used command

Install pip with Proxy
Installs pip packages defining a proxy


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: