Bourne shell differences w.r.t functions?
Erik E. Rantapaa
rantapaa at cs.umn.edu
Fri Sep 14 02:38:36 AEST 1990
In experimenting on various systems, I have found the following
differences in the way /bin/sh handles functions:
* Some give functions their own private argument list.
* Some have arguments passed to functions overwrite the script's
argument list.
* Some don't support functions at all.
I have some questions that maybe the net could help with:
If /bin/sh supports functions, which behavior is more common?
Also, does the fact that some Bourne shells don't support functions
mean that I shouldn't use functions in scripts which I send out for
general use? Are replacements such as bash and ksh widely enough
available so people can use them if they have a defective /bin/sh?
For maximum portability, should I just avoid using functions
altogether? :(
Finally, what is the POSIX standard with regard to this?
--
Erik Rantapaa
rantapaa at cs.umn.edu
More information about the Comp.unix.shell
mailing list