Guest User

Untitled

a guest
Aug 16th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/usr/bin/ksh
  2. while read i
  3. do
  4. x=`echo $i |cut -d"|" -f2`
  5. rem=`expr $x % 62`
  6. echo "reminder is " $rem
  7. quo=`expr $x / 62`
  8. echo "quotiont is " $quo
  9.  
  10. grp_rem=" "
  11. if [[ ${#quo} -ge 2 ]]
  12. then
  13. while [ $quo -ge 62 ]
  14. do
  15. sub_rem=`expr $quo % 62`
  16. quo=`expr $quo / 62`
  17. grp_rem=`echo $sub_rem" "$grp_rem`
  18. done
  19. fi
  20. echo $i"|"$quo" "$grp_rem" "$rem >> base62_while.out
  21. done < base62_while.txt
  22.  
  23. 1|5147634738948389685
  24.  
  25. 1|5147634738948389685|6 8 16 13 46 17 20 35 9 49 43
Add Comment
Please, Sign In to add comment