Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/ksh
- while read i
- do
- x=`echo $i |cut -d"|" -f2`
- rem=`expr $x % 62`
- echo "reminder is " $rem
- quo=`expr $x / 62`
- echo "quotiont is " $quo
- grp_rem=" "
- if [[ ${#quo} -ge 2 ]]
- then
- while [ $quo -ge 62 ]
- do
- sub_rem=`expr $quo % 62`
- quo=`expr $quo / 62`
- grp_rem=`echo $sub_rem" "$grp_rem`
- done
- fi
- echo $i"|"$quo" "$grp_rem" "$rem >> base62_while.out
- done < base62_while.txt
- 1|5147634738948389685
- 1|5147634738948389685|6 8 16 13 46 17 20 35 9 49 43
Add Comment
Please, Sign In to add comment