Pages

Tuesday, March 19, 2013

Write a script to creat a menu using case?


$vi menu_case.sh
clear
tput cut 10 25
echo “main menu”
tput cut 11 25
echo “————”
tput cut 12 25
echo “1.Date “
tput cut 13 25
echo “2.All files”
tput cut 13 25
echo “3.All Users”
tput cut 14 25
echo “4.No items found”
read choice
case $choice in
1)echo “Today Date ::” `date`
;;
2)ls -f
;;
3)finger
;;
*)exit
;;
esac
:wq

No comments:

Post a Comment