diff options
author | hardythe1 | 2012-08-24 12:50:05 +0530 |
---|---|---|
committer | hardythe1 | 2012-08-24 12:50:05 +0530 |
commit | 6f281af9bde99a7ff6260593fc5faeb97194ac58 (patch) | |
tree | 49ee7b0f80b1c7a12af1c2604534122a7c22f2c0 /ult/ult_9/clause.sh | |
parent | 5dc254097176489bfd2834a66fe437fe62a36fb8 (diff) | |
parent | e044a1c56a45403c9c0dba09f1642c7667ac62fc (diff) | |
download | sdes-stscripts-6f281af9bde99a7ff6260593fc5faeb97194ac58.tar.gz sdes-stscripts-6f281af9bde99a7ff6260593fc5faeb97194ac58.tar.bz2 sdes-stscripts-6f281af9bde99a7ff6260593fc5faeb97194ac58.zip |
Merge branch 'master' of https://github.com/FOSSEE/sdes-stscripts
Diffstat (limited to 'ult/ult_9/clause.sh')
-rw-r--r-- | ult/ult_9/clause.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ult/ult_9/clause.sh b/ult/ult_9/clause.sh new file mode 100644 index 0000000..23017f2 --- /dev/null +++ b/ult/ult_9/clause.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Script to greet the user according to time of day +hour=`date | cut -c12-13` +now=`date +"%A, %d of %B, %Y (%r)"` +if [ $hour -lt 12 ] +then + mess="Good Morning $LOGNAME, Have a nice day!" +fi + +if [ $hour -gt 12 -a $hour -le 16 ] +then + mess="Good Afternoon $LOGNAME" +fi + +if [ $hour -gt 16 -a $hour -le 18 ] +then + mess="Good Evening $LOGNAME" +fi +echo -e "$mess\nIt is $now" + |