This commit is contained in:
2019-01-13 18:49:01 +01:00
parent 61ad7ca3c4
commit 021fade4d2
10 changed files with 128 additions and 35 deletions

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# Set PS3 prompt
PS3="Enter the space shuttle to get more information : "
# set shuttle list
select shuttle in columbia endeavour challenger discovery atlantis enterprise pathfinder
do
echo "$shuttle selected"
done

View File

@@ -3,7 +3,7 @@
PS3="Enter the space shuttle to get more information : "
# set shuttle list
select shuttle in columbia endeavour challenger discovery atlantis enterprise pathfinder
select shuttle in columbia endeavour challenger discovery atlantis enterprise pathfinder exit
do
case $shuttle in
columbia)
@@ -41,6 +41,10 @@ do
echo "Space Shuttle Orbiter Pathfinder is a Space Shuttle simulator made of steel and wood."
echo "--------------"
;;
exit)
echo "Bye!"
break
;;
*)
echo "Error: Please try again (select 1..7)!"
;;

9
beispiele/5/10-whiptail.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
if (whiptail --title "Example Dialog" --yesno "This is an example of a yes/no box." 8 78)
then
whiptail --title "Exit Info" --msgbox "Du hast Yes gewählt. Exit Status: $?." 8 78
else
whiptail --title "Exit Info" --msgbox "Du hast NO gewählt. Exit Status: $?." 8 78
fi

7
beispiele/5/11-read.sh Normal file
View File

@@ -0,0 +1,7 @@
#/bin/sh
echo "Name?"
read name
echo "Age?"
read age
echo "Hello $name, you are $age years old"