./script.sh のように 直接実行 する時、シバンがないと どのプログラムで解釈すべきか不明 (実行権限があっても失敗するか、想定外のシェルで動く)。
Linuxでは、シェルスクリプトを活用することで処理の自動化などが行える。システム管理のさまざまな場面でシェルスクリプトが使われており、管理機能がシェルスクリプトで作られていることもある。以下、It’s FOSSの「How to Run a Shell Script in Linux [Essentials ...
You've seen it a million times—the hash-bang (#!) line at the top of a script—whether it be Bash, Python, Perl or some other scripting language. And, I'm sure you know what its purpose is: it ...