Host introspection: Difference between revisions

Content added Content deleted
(Added Bash / Unix Shell Implementation)
Line 1,392: Line 1,392:


No match, so big endian.
No match, so big endian.

=={{header|UNIX Shell}}==
The getconf command gets the word size, the piped command list gets the endianness , 1 means Little and 0 means Big :
<lang bash>
Aamrun$ getconf WORD_BIT
32
Aamrun$ echo -n I | od -to2 | awk 'FNR==1{ print substr($2,6,1)}'
1
Aamrun$
</lang>


=={{header|Wren}}==
=={{header|Wren}}==