And here's how to do it in pure shell:

typeset -b c

while read -n 1 c; do printf "%02X\n" "'$(print -v c)'"; done < file

On 28 January 2015 at 07:42, David Korn <[email protected]> wrote:
> Can't you do
>
> od -tx1 -An < file | tr ' ' $'\n'
>
> to write one hex byte for each character in file?
>
>
> On Wed, Jan 21, 2015 at 2:16 PM, Wendy Lin <[email protected]> wrote:
>>
>> On 30 September 2014 at 15:34, Wendy Lin <[email protected]> wrote:
>> > Can I configure AST od to print one byte from stdin as single, 2 digit
>> > hex number, without any file position information? If so, how?
>>
>> Has anyone found a solution?
>>
>> Wendy
>> _______________________________________________
>> ast-developers mailing list
>> [email protected]
>> http://lists.research.att.com/mailman/listinfo/ast-developers
>
>
>
> _______________________________________________
> ast-developers mailing list
> [email protected]
> http://lists.research.att.com/mailman/listinfo/ast-developers
>



-- 
Regards

Danny
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to