#!/usr/bin/env bash # From: RFC 1321, section A.5 (https://www.ietf.org/rfc/rfc1321.txt) # On OS X, we need to explicitly use GNU sed SED=$(if which gsed 2>/dev/null ; then echo gsed ; else echo sed ; fi) make_byte_sequence () { $SED 's!\([0-9a-f][0-9a-f]\)!0x\1uy; !g' } { cat <