ShadowArch/Shared/bigorlittle

4 lines
135 B
Plaintext
Raw Normal View History

2016-11-09 22:25:00 -06:00
#!/bin/bash
if [ $(echo -n I | od -to2 | head -n1 | cut -f2 -d" " | cut -c6) ]; then echo "Little endian"; else echo "Big endian"; fi