How to check if today is a weekend using bash or even perl?
I want to prevent certain programs to run on a weekend.
printf also has date
printf -v day '%(%a)T' case $day in Sat|Sun) echo "Hooray!";; esac
https://ideone.com/wU7C0c - demo