Check to see if today is a certain date

Posted by luckytaxi on Stack Overflow See other posts from Stack Overflow or by luckytaxi
Published on 2010-03-17T20:21:26Z Indexed on 2010/03/17 20:31 UTC
Read the original article Hit count: 166

Filed under:

I want to check if the day is Sunday, but for some reason I can't get it to work.

[[ "date '+%a'" == "Sun" ]] && echo "Today is Sunday"

© Stack Overflow or respective owner

Related posts about shell-scripting