We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- Looping with Numbers
- Discussions
Looping with Numbers
Looping with Numbers
Sort by
recency
|
100 Discussions
|
Please Login in order to post a comment
for i in {1..50};do echo $i;done
both:
and:
limit=50
Define a variable to start the loop
num=1
Loop until num reaches the limit
while [ limit ] do # Print the current value of num echo $num
done