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

RSS Icon Subscribe to comments

You need to login to post a comment.