Posted By

kesor on 04/03/07


Tagged

hex bc


Versions (?)

convert from int to hex


 / Published in: Bash
 

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

  1. inttohex() { echo $(echo "obase=16; $1" | bc) }

Report this snippet  

You need to login to post a comment.