Linux Endianess Check

echo -n I | hexdump -o | awk '{ print substr($2,6,1); exit}'
# 0 for BE, 1 for LE