diff --git a/Labb5/test_while2.sh b/Labb5/test_while2.sh new file mode 100755 index 0000000..cdb47e8 --- /dev/null +++ b/Labb5/test_while2.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Jack-Benny Persson +# LX13 +# Just testing some while again + +Num=0 + +while [ $Num -lt 5 ]; do + read -p "Enter something: " Test + let Num++ # Or use ((Num++)) or Num=$[Num+1] + echo "" + echo "U entered $Test and this is the $Num time you run the loop" +done