TotalCodes
Menu
Android
Data Structure
Oracle(PL/SQL)
Shell Scripts
Monday, 27 May 2013
Shell Script to find time of day
time=$(date +%T)
hh=`echo $time | cut -b 1-2`
mm=`echo $time | cut -b 4-5`
if [ $hh -ge 5 ] && [ $hh -le 12 ]
then
echo "Good Morning"
else
echo "Good Afternoon"
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment