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.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

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.

World cup college
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

2010-03-03 - Commandlinefu @ SXSW 2010
Am going to be at SXSW this year, in case you want to submit any CLI nuggets or suggestions to me in person. Ping me on the @codeinthehole Twitter account.
2009-09-12 - Email updates now available
You can now enable email updates to let you know each time you're command is commented on.
2009-07-11 - API and javascript blog widget now available
A simple API has been released, allowing commands to be retrieved in various formats. This also allows commands to be embedded on blogs/homepages.
2009-05-17 - Added duplicate suggestions to the new command form
When adding a new command, a quick background search is performed to make sure you're not duplicating a command already in the system.
Hide

Tags

Hide

Functions

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
14
your terminal sings

you know the song... sing along

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 5 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 5 weeks and 4 days ago

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

Comment by vargasmas 5 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 5 weeks and 3 days ago

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

Comment by GinoMan2440 5 weeks and 3 days ago

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

Comment by bubo 5 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 vargasmas 5 weeks and 2 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 vargasmas 5 weeks and 2 days ago
echo {99..1}" bottles...
Comment by dennisw 5 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 4 weeks and 6 days ago

Your point of view

You must be signed in to comment.

Related sites and podcasts