Thursday, August 22, 2013

convert ip to hex

because i need to to this for sparc jumpstart.
#!/bin/bash

echo "type in four octets to convert to hex"

read IP_ADDR

printf '%02X' ${IP_ADDR//./ }; echo

No comments: