[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dash-as-bin-sh



Wes Garland <wes@page.ca> wrote:
> 2 - Is there way to detect that a script is running as dash, instead of a
> shell like Solaris' /bin/sh

If you write your script portably it will work with /bin/sh, for many
values of sh. If you rely on features of ksh or bash you should specify
one of those shells on the #! line.


> 4 - Reason for #2, is there a way to list all functions declared in a script
> with dash?

"set" works for ksh, bash, and dash. On (at least) Solaris 9 & 10 and
Debian. Is that enough?

Chris


Reply to: