daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #Menueprogrammierung
  3. until [ $auswahl = 0 ]
  4. do
  5.     dialog --title "Programm menue" --menu "Ihre Wahl bitte:" 15 60 4 \
  6.     "a" "Angemeldete User anzeigen" \
  7.     "b" "Arbeitsverzeichis anzeigen" \
  8.     "c" "Inhalt der Datei /etc/passwd anzeigen" \
  9.     "0" "Menueprogramm beenden"\
  10.     2>$$.temp;taste=$=
  11. auswahl=$(cat $$.temp)
  12. rm $$.temp
  13. if [ $taste eq 1 -o $taste -eq 255 ];then
  14. dialog --msgbox "Bitte a,b oder c eingeben." 5 40
  15. fi
  16.  
  17. case $auswahl in
  18.     "a") clear
  19.     echo "Die angemeldeten User sind:";who
  20.     sleep 2;;
  21.     "b") clear
  22.     echo "Das aktuelle Arbeitsverzeichnis ist:";pwd
  23.     sleep 2;;
  24.     "c") clear
  25.     echo "Inhalt der Datei:"; cat /etc/passwd
  26.     sleep 2;;
  27.     "0")
  28.     dialog --infobox "Das Menueprogramm wird beendet..." 4 40
  29.      sleep 2
  30.          clear;;
  31. esac
  32.  
  33. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top