convert from int to hex


/ Published in: Bash
Save to your folder(s)

A subroutine to convert from 10 base integer into 16 base hexadecimal.


Copy this code and paste it in your HTML
  1. inttohex() { echo $(echo "obase=16; $1" | bc) }

Report this snippet


Comments


You need to login to view comments.