ShadowArch/UserScripts/bigorlittle

4 lines
135 B
Bash
Executable File

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