Master piece, and a song.

February 20th, 2010

Browsing the internet I found this then I’d say “hey, if there is a flowchart there should be a code” then I’d found out that the flowchart was wrong, nevertheless I’ve written the bash code for the full Beattles – Hey Jude song.
#!/bin/bash
for i in $(seq 1 1 4)
do
echo " "
echo -n "Hey Jude don't "
if [ $i == 1 ] || [ $i == 4 ]; then
echo "make it bad"
echo "Take a sad song and make it better"
fi
if [ $i == 2 ]; then
echo "be afraid"
echo "You were made to go out and get her"
fi
if [ $i == 3 ]; then
echo "let me down"
echo "You have found her, now go and get her"
fi
if [ $i == 1 ] || [ $i == 3 ] ; then
echo "Remember to let her into your heart"
else
echo "The minute you let her under your skin"
fi
echo -n "Then you "
if [ $i == 1 ] || [ $i == 3 ] ; then
echo -n "can start "
else
echo -n "begin "
fi
echo "to make it better"
if [ $i == 2 ]; then
echo " "
echo "And any time you feel the pain, Hey Jude, refrain"
echo "Don't carry the world upon your shoulders"
echo "For well you know that it's a fool who plays it cool"
echo "By making his world a little colder"
fi

if [ $i == 3 ]; then
echo " "
echo "So let it out and let it in"
echo "Hey Jude begin"
echo "You're waiting for someone to perform with"
echo "And don't you know that it's just you"
echo "Hey Jude you'll do"
echo "The movement you need is on your shoulder"
fi
done

One Response to “Master piece, and a song.”

  1. alvarezp Says:

    This was actually entertaining; nice one.

Leave a Reply

Connect with Facebook