Skip to content

Latest commit

 

History

History

ep033

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Today I explain what a shebang is on posixlike platforms and how the OS decides what is executable. I also show a bit how windows doesn't support this and how it decides what is executable.

Interactive examples

Bash

ls /usr/bin
ls -al /usr/bin/zip
ls -al /usr/bin/ls

./t.sh
ls -al t.sh
chmod +x t.sh
./t.sh
mv t.sh t.py
./t.py

env
env X=1 bash -c 'echo $X'
env X=124 bash -c 'echo $X'
env bash
exit

Windows CMD

echo %PATH%
echo %PATHEXT%
cat t.py
t.py