Here are some common shebangs used in scripts:
-
Bash:
#!/bin/bash -
Sh (Bourne shell):
#!/bin/sh -
Python:
#!/usr/bin/env python3 -
Perl:
#!/usr/bin/perl -
Ruby:
#!/usr/bin/env ruby -
Node.js:
#!/usr/bin/env node -
PHP:
#!/usr/bin/php
Notes:
- Using
#!/usr/bin/envis a common practice as it finds the interpreter in the user'sPATH, making scripts more portable across different environments. - Always ensure the specified interpreter is installed on the system where the script will run.
If you need more information or examples, feel free to ask!
