Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.
Hide

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

your terminal sings

Terminal - your terminal sings
echo {1..199}" bottles of beer on the wall, cold bottle of beer, take one down, pass it around, one less bottle of beer on the wall,, " | espeak -v english -s 140
2010-02-04 04:38:52
User: op4
Functions: echo
21
your terminal sings

you know the song... sing along

Alternatives

There are 10 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

My version:

(g=echo;s=s;n="o more";o="bottle";e="of beer";a="Take one down and pass it around";w="on the wall";for ((i=99;i>0;i--));do [ $i == 1 ]&&unset s;$g -n "$i $o$s $e $w, $i $o$s $e. $a, `[ $[i-1] != 0 ]&&$g $[i-1]||$g "n$n"` $o`[ $i != 2 ]&&$g s` $e $w. ";done;$g -ne "N$n ${o}s $e $w, n$n ${o}s $e. Go to the store and buy some more, 99 ${o}s $e $w.")|espeak -v english -s 140
Comment by eightmillion 342 weeks and 4 days ago

Para los hispanoparlantes:

echo {1..199}" elefantes se balanceaban sobre la tela de una ara?a, como ve?an que no se ca?an, fueron a llamar a otro elefante,, " | espeak -v spanish -s 140

Comment by kutus 342 weeks and 4 days ago

You're supposed to count down in hex...

Comment by SuperFly 342 weeks and 4 days ago

For OSX, substitute espeak with say:

(g=echo;s=s;n="o more";o="bottle";e="of beer";a="Take one down and pass it around";w="on the wall";for ((i=99;i>0;i--));do [ $i == 1 ]&&unset s;$g -n "$i $o$s $e $w, $i $o$s $e. $a, `[ $[i-1] != 0 ]&&$g $[i-1]||$g "n$n"` $o`[ $i != 2 ]&&$g s` $e $w. ";done;$g -ne "N$n ${o}s $e $w, n$n ${o}s $e. Go to the store and buy some more, 99 ${o}s $e $w.")| say

Comment by antic 342 weeks and 4 days ago

... you just made my day really average.... remind me to post this on MLIA :)

Comment by GinoMan2440 342 weeks and 4 days ago

echo "salue, amice, ut uales?" | espeak -v latin -s 140

Comment by bubo 342 weeks and 3 days ago

Sing it in Hexadecimal:

s=s;n="o more";o="bottle";e="of beer";a="Take one down and pass it around";w="on the wall";for ((i=255;i>0;i--));

do [ $i == 1 ] && unset s; ihex=$(echo "obase=16; $i" | bc);

echo "$ihex $o$s $e $w, $ihex $o$s $e. $a, `[ $[i-1] != 0 ] && echo $(echo "obase=16; $[i-1]" | bc) || echo "n$n"` $o`[ $i != 2 ] && echo s` $e $w. ";done;echo -e "N$n ${o}s $e $w, n$n ${o}s $e. Go to the store and buy some more, FF ${o}s $e $w."

Comment by SuperFly 342 weeks and 3 days ago

This works better, but can we do it in less that 255 characters?

s=s;n="o more";o="bottle";e="of beer";a="Take one down and pass it around";w="on the wall";for ((i=255;i>0;i--));do [ $i == 1 ] && unset s;ihex=$(echo "obase=16; $i" | bc);echo "$ihex $o$s $e $w, $ihex $o$s $e. $a, `[ $[i-1] != 0 ] && echo $(echo "obase=16; $[i-1]" | bc) || echo "n$n"` $o`[ $i != 2 ] && echo s` $e $w. ";done;echo -e "N$n ${o}s $e $w, n$n ${o}s $e. Go to the store and buy some more, FF ${o}s $e $w."

Comment by SuperFly 342 weeks and 3 days ago
echo {99..1}" bottles...
Comment by dennisw 342 weeks and 1 day ago

As Antic said, on the mac substitute "espeak" with "say", but add the Cellos voice:

echo {1..199}" bottles of beer on the wall, cold bottle of beer, take one down, pass it around, one less bottle of beer on the wall.. " | say -v Cellos

Here a list of other voices you can play with on a mac:

Female Voices

say -v Agnes "hello world" say -v Kathy "hello world" say -v Princess "hello world" say -v Vicki "hello world" say -v Victoria "hello world"

Male Voices

say -v Bruce "hello world" say -v Fred "hello world" say -v Junior "hello world" say -v Ralph "hello world"

Novelty Voices

say -v Albert "hello world" say -v "Bad News" "hello world" say -v Bahh "hello world" say -v Bells "hello world" say -v Boing "hello world" say -v Bubbles "hello world" say -v Cellos "hello world" say -v Deranged "hello world" say -v "Good News" "hello world" say -v Hysterical "hello world" say -v "Pipe Organ" "hello world" say -v Trinoids "hello world" say -v Whisper "hello world" say -v Zarvox "hello world"
Comment by netsaint 341 weeks and 6 days ago

Your point of view

You must be signed in to comment.