Well, Im trying to practice a bit of shell script but Im stuck at this while loop excercise. I simply want to use whatever number the use inputs as the loop`s condition.
echo "Type any number"
while [$a -lt $input]
a=`expr $a + 1`
You might wonder to have such script:
#!/bin/bash a=0 input="" echo "Type any number" #here you forgot to close string with " read input #here you don't need $ while [ $a -lt $input ] #note extra spaces after [ and before ] do echo $a a=`expr $a + 1` done