Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do know if today is sunday 1

Status
Not open for further replies.

municipal

Programmer
Jan 1, 2001
62
IL
in KSH script
 
I am sorry, but I do not understand what to do with it
 
Test the output to see whether it's Sunday or not. Something like:

dayofweek=`date +%A`
if [ $dayofweek = "Sunday" ]
then
echo "Rest"
else
echo "Work harder!"
fi

HTH.
 
the other "way"...

[ `date +%A` = Sunday ] && echo today is sunday || echo "today isn't sunday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top