This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# reset num to zero unset iteration if you want to run it over again. | |
num=0; unset iteration; while [[ $num -lt 32 ]] # continue to increase iteration until $num is 32 | |
do | |
let num=$((1+$num)) # increase num by 1 | |
let modu=$((num%10)) # get digits between 0 and 9 | |
iteration="${iteration}${modu}" # concat previous iteration with modu | |
printf "%s\n" "${iteration}" # print iteration as a string so you can go past 20 decimal limit, | |
done # you can use echo instead of printf if you want |