Advertisement
sanpai

MENU BOX

Oct 6th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. dialog --title "ENTER YOUR CHOICE" --backtitle "MENU DRIVEN PROGRAM" \
  4. --menu "USE UP DOWN TO SELECT" 15 50 3 \
  5. DATE/TIME " TO DISPLAY TIME & DATE " \
  6. CALENDER " TO DISPLAY CALENDER " \
  7. LOGINUSERS " To DISPLAY CURRENTLY LOGGED IN USERS " 2>input.txt \
  8.  
  9. sel=`cat input.txt`
  10.  
  11. case $sel in
  12.  
  13. DATE/TIME) dialog --msgbox " `date` " 50 50 ;;
  14. CALENDER) dialog --msgbox " `cal` " 50 50 ;;
  15. LOGINUSERS) dialog --msgbox " `who` " 50 50 ;;
  16.  
  17. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement