Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function happy_birthday(){
- echo get cake
- echo light candles
- echo open gifts
- i=0
- #while cake_count > i
- #output=''
- for i in {1..4}
- do
- output=$output" Happy Birthday"
- if [ $i -eq 3 ]
- then
- output=$output" Dear Aaron"
- else
- output=$output" To You"
- echo -e $output
- output=''
- fi
- done
- }
- if [ "`date +\"%d %b\"`" = '22 Oct' ]
- then
- happy_birthday
- echo "Happy Birthday Aaron!"
- else
- y=$(date --date '22 Oct' +%j)
- x=$(date +%j)
- ((z=${y}-${x}))
- echo "${z} days until Aaron's next birthday!"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement