echo "Please enter a date YYYY/MM/DD" read date day=`date -d $date +"%w"` if [ $day -eq 6 ] then echo "$date is a Saturday" else echo "$date is NOT a Saturday" fi
echo "2007 01 06" | awk '$NF == 6 { print "yes: saturday" }'