Börjat på labb 2

This commit is contained in:
Jack-Benny Persson 2013-12-10 11:52:38 +01:00
parent 1398b01cc5
commit 606ec5f4cb
4 changed files with 25 additions and 0 deletions

5
Labb2/export.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
declare -x DIST=Ubuntu
echo "export.sh $DIST"
bash import.sh
exit 0

3
Labb2/import.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "import.sh Disten är $DIST"
exit 0

10
Labb2/inmatning.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
#Definiera Name
Name="Hemligt"
read -t 3 -p "Vad heter du? " Name
Name=${Name:="Hemligt"} # Definiera Name till Hemligt om ingen input
printf "Du heter: $Name\n\n"
exit 0

7
Labb2/unsettest.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
declare DIST=Hej
echo "Utan unset: $DIST"
unset DIST
echo "Med unset: $DIST"
exit 0