Created
April 7, 2014 08:33
-
-
Save Akhilan/10016702 to your computer and use it in GitHub Desktop.
B'day Wish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
today=$(date +"%Y-%m-%d") | |
birthdate=$(date +"YYYY-MM-DD") | |
for (( ; ; )) | |
do | |
clear | |
diff=$( printf '%s' $(( $(date -u -d"$today" +%s) - $(date -u -d"$birthdate" +%s))) ) | |
days=$(( $diff /86400 )) | |
hours=$(( $diff / 3600 )) | |
mintues=$(( $diff/ 60 )) | |
years=$(( $days / 365 )) | |
echo "Hey xxxxx " | |
read -n 1 | |
echo "You are $days days old" | |
read -n 1 | |
echo "Otherwise $hours hours" | |
read -n 1 | |
echo "Or $mintues mintues" | |
read -n 1 | |
echo "That is almost equal to $years years" | |
read -n 1 | |
echo "Quarter of a century" | |
read -n 1 | |
echo "Silver Jubilee" | |
read -n 1 | |
echo "അതു കൊണ്ടു പറയുകയാ.. ഇനിയെങ്കിലും അഞ്ചു പയിസയുടെയെങ്കിലും പക്വത കാട്ടിക്കൂടേ.. " | |
read -n 1 | |
read -p "Try again (y/N) (വീണ്ടും എന്റെ വായീന്ന് കേപ്പിച്ചേ അടങ്ങൂ..) ? " trAgn | |
[ "$trAgn" == "y" -o "$trAgn" == "Y" ] && : || break | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment