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 <dgk...@gmail.com> 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 <wendlin1...@gmail.com> wrote:
>>
>> On 30 September 2014 at 15:34, Wendy Lin <wendlin1...@gmail.com> 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
>> ast-developers@lists.research.att.com
>> http://lists.research.att.com/mailman/listinfo/ast-developers
>
>
>
> _______________________________________________
> ast-developers mailing list
> ast-developers@lists.research.att.com
> http://lists.research.att.com/mailman/listinfo/ast-developers
>



-- 
Regards

Danny
_______________________________________________
ast-developers mailing list
ast-developers@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to