Question
In Linux, write a simple bash script that print the numbers from 1 to 4 out to the stdout in a loop (to demonstrate your knowledge of while loop).
#!/bin/bash
n=1
while [ $n -le 4 ] do ​​​​​​​ echo$n
n = $[n+1] done ​​​​​​​ Question In Linux, write a simple bash script that print the numbers from 1 to 4 out to the stdout in a loop (to demonstrate your knowledge of while loop). Answer ? Question In Linux, write a simple bash script that print the numbers from 1 to 4 out to the stdout in a loop (to demonstrate your knowledge of while loop). Answer #!/bin/bash n=1 while [$n -le 4 ]
do
​​​​​​​    echo $n n =$[n+1]
done
​​​​​​​
If you want to change selection, open document below and click on "Move attachment"

7. Shell Scripting
ere is an example ( -le stands for less than or equal): 5 N=1 while test "$N" -le "10" do echo "Number$N" N=\$[N+1] done The N=1 creates a variable called N and places the number 1 into it. The <span>while command executes all the commands between the do and the done repetitively until the test condition is no longer true (i.e., until N is greater than 10 ). The -le stands for less than o

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions