The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 08-22-2007
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Code:
#! /bin/ksh
#
#

case $# in
    2) start=$1; end=$2 ;;
    *) echo "Need a start and end time"; exit 1;;
esac

now=$(date +%H)
if [[ $now -ge $start && $now -lt $end ]] ;
then
    echo "Judgement Day has arrived."
else
    echo "Judgement Dat yet to arrive."
fi;