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