DEV Community 👩‍💻👨‍💻

Discussion on: What the #! shebang really does

Collapse
 
ninofiliu profile image
Nino Filiu

Also to answer the question

but why #! and not 00 or /// or any other sequence of characters?

#! is encoded to the bytes 23 21 which is the magic number of an executable script. A magic number is a sequence of bytes at the beginning of a file that allows to identify which is the type of a file, for example, a png file will always begin by the bytes 89 50 4E 47.