tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: host endianness



On Mon, Feb 08, 2010 at 07:03:17AM +0000, David Laight wrote:
 > Something based on:
 >     (set $(echo a|od -h); [ $2 = 0a61 ] && echo little || echo big;)
 > probably avoids needin a host compiler.

clever :-) how about this:

echo -n 'C!' | od -h | sed 's/[^1234]*//;s/2143/4321/p;d'

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index