Börjat på labb 3
This commit is contained in:
17
Labb3/compare.sh
Executable file
17
Labb3/compare.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Jack-Benny Persson
|
||||
# LX13
|
||||
|
||||
read -p "Skriv något: " Str1
|
||||
read -p "SKriv något: " Str2
|
||||
|
||||
|
||||
if [ "$Str1" = "$Str2" ]; then
|
||||
echo "$Str1 är lika med $Str2"
|
||||
elif [ "$Str1" != "$Str2" ]; then
|
||||
echo "$Str1 är inte samma som $Str2"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user