Skip to content

Instantly share code, notes, and snippets.

Old Account plank-sr

View GitHub Profile
plank-sr /
Last active Mar 15, 2016
create a string starting with 1 and concat n+1, until you reach the charcter length you want, in this case 32
# 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
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
You can’t perform that action at this time.