AWK/SED for binary data