Advertising
Paste Description for ajehuk
bash script - is it sunday
- ajehuk
- Sunday, August 19th, 2007 at 11:11:27pm UTC
- #!/bin/bash
- #assign the day of the week to the variable day
- day="`date -d now +%u`"
- #check if the variable day is 7(sunday) or not
- # (1-mon,2=tue,3=wed,4=thu,5=fri,6=sat,7=sun)
- if [[ "$day" == "7" ]]
- then echo "its Sunday"
- else echo "Its not sunday"
- fi
- ajehuk - www.ictsc.com - 'The ICT and security Company'
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.