Advertisement
jkister

happy birthday cake

Dec 18th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function happy_birthday(){
  4. echo get cake
  5. echo light candles
  6. echo open gifts
  7. i=0
  8. #while cake_count > i
  9. #output=''
  10. for i in {1..4}
  11. do
  12. output=$output" Happy Birthday"
  13. if [ $i -eq 3 ]
  14. then
  15. output=$output" Dear Aaron"
  16. else
  17. output=$output" To You"
  18. echo -e $output
  19. output=''
  20. fi
  21.  
  22. done
  23. }
  24. if [ "`date +\"%d %b\"`" = '22 Oct' ]
  25. then
  26. happy_birthday
  27. echo "Happy Birthday Aaron!"
  28. else
  29. y=$(date --date '22 Oct' +%j)
  30. x=$(date +%j)
  31. ((z=${y}-${x}))
  32.  
  33. echo "${z} days until Aaron's next birthday!"
  34. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement