Börjat på labb 2
This commit is contained in:
parent
1398b01cc5
commit
606ec5f4cb
5
Labb2/export.sh
Executable file
5
Labb2/export.sh
Executable 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
3
Labb2/import.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "import.sh Disten är $DIST"
|
||||||
|
exit 0
|
10
Labb2/inmatning.sh
Executable file
10
Labb2/inmatning.sh
Executable 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
7
Labb2/unsettest.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
declare DIST=Hej
|
||||||
|
echo "Utan unset: $DIST"
|
||||||
|
unset DIST
|
||||||
|
echo "Med unset: $DIST"
|
||||||
|
exit 0
|
Loading…
x
Reference in New Issue
Block a user