truncate list of numbers at a specific point in a for loop linux code example
Example 1: bash for loop
#!/bin/bash
for (( c=1; c<=5; c++ ))
do
echo "Welcome $c times"
done
Example 2: for in bash
for i in {0..100..10}
do
echo $i
done
will print #0 10 20 30 40 ...100