Linux Commands for 99 Bottles of Beer

Filed under
Linux
HowTos
Humor

Linux server admins need good scripting skills and command-line chops, but who says they can't be fun? Learn Bash Karaoke with 99 Bottles of Beer on the Wall, quickly find disk hogs, and display used/free disk space.

99 Bottles of Beer on the Wall

How about a bit of geek Karaoke? Just copy and paste this into a Bash session, and it will look like this:

$ x="bottles of beer";y="on the wall";for b in {99..1};do echo "$b $x $y, $b $x. Take one down pass it around, $(($b-1)) $x $y"; sleep 3;done

99 bottles of beer on the wall, 99 bottles of beer. Take one down pass it around, 98 bottles of beer on the wall
98 bottles of beer on the wall, 98 bottles of beer. Take one down pass it around, 97 bottles of beer on the wall
97 bottles of beer on the wall, 97 bottles of beer. Take one down pass it around, 96 bottles of beer on the wall

And so on, until it finishes.

rest here