quarta-feira, 9 de maio de 2018

#!/bin/bash
for number in 1 2 3 4 5
do
echo $number
done
#!/bin/bash
for number in {1..10}; do
    echo "$number "
done
#!/bin/bash
for number in {0..100..10}; do
    echo "$number "
done
#!/bin/bash
for ((number=1;number < 100;number++)){
    if (( $number % 5 == 0 )); then
        echo "$number is divisible by 5 "
    fi
}
exit 0

Referências

https://www.lifewire.com/bash-for-loop-examples-2200575

0 comentários: