bash scripting across linux and solaris

David Rosenstrauch darose-prQxUZoa2zOsTnJN9+BGXg at public.gmane.org
Wed Aug 26 17:49:54 EDT 2009


On 08/26/2009 05:45 PM, Stephen Adler wrote:
> Hi all,
> 
> I'm writing a bash script which I would like to execute the same script 
> on a linux and a solaris system. but my problem is that the bash 
> executable is in /usr on linux and /usr/bin on solaris. So how do I 
> define the first line #! syntax so that the shell which is executing the 
> script knows where to pick up the executable.

Can't you just use:

#!/bin/sh

DR






More information about the Discuss mailing list