Example use of case in KSH. Show Today’s Day Name #Linux/Unix: Shell Programming – 001

bash-3.2$ cat ksh_case_example_1.sh
#!/bin/ksh

#show today’s day name
DAY=`date +%a`

#show value of $DAY
echo $DAY

#based on the value of the DAY variable show the day name in full format
case “$DAY” in

Mon)
echo “Monday”
;;

Tue)
echo “Tuesday”
;;

Wed)
echo “Wednesday”
;;

Thu)
echo “Thursday”
;;

Fri)
echo “Friday”
;;

Sat)
echo “Saturday”
;;

Sun)
echo “Sunday”
;;

esac

—————

Output – ?????

bash-3.2$ ./ksh_case_example_1.sh
Sun
Sunday From: http://sitestree.com/?p=12183
Categories:Linux/Unix: Shell Programming – 001
Tags:
Post Data:2018-04-16 18:14:45

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada