I would like to write cross platform scripts in some interpreted language (Python, Go, Node, whatever).
This is trivial in *nix systems (MacOS, Linux, BSD) as I just need to mark a file as executable using
chmod +x ./myfile and the system will execute that script using the specified interpreter in the shebang (
#!/usr/bin/env python). I can then run the file as though it were an executable using
I would like to replicate this in Windows, however in Powershell running
.\myfile attempts to open that file using the graphical OS "choose what application to run this with" dialog.
Is there an equivalent to
chmod +x ./myfile && ./myfile in Windows or do I have to instruct people to use the full command (eg