Magic bytes for scripts intended for processing by interpreter named in rest of line
!/bin/bash
Magic bytes for Executable and Linkable format
0x7f (backspace)
‘E’ ‘L’ ‘F’
Writing a script
Start with magic bytes + name of interpreter
chmod +x file
./file
OR
bash file
Plain text file problems
Byte order mark
Windows notepad
BOM U+FEFF
invisible character if FEFF
invalid if FFEF
check to derive endianness of a 16 bit file
subsequently used as a marker for UTF8 formats
interferes with magic bytes for Unix shell scripts #!