Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify the Bourne shell (not sh)

I am writing a script and I want it to start with the Bourne shell. As I understand it, starting the script with:

#! /bin/sh

will not always specify the Bourne shell, but whatever the OS links to /bin/sh. Is there a way to explicitly specify Bourne?

Thanks!

like image 820
Josh Avatar asked Oct 20 '25 13:10

Josh


1 Answers

The original Bourne Shell is not open source, so if you don't already have it, you're SOL.

If you do already have it, just put the location in the shebang.

Simple as that.

like image 92
I wrestled a bear once. Avatar answered Oct 22 '25 02:10

I wrestled a bear once.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!