Re: Proposed new POSIX sh policy
Hi,
Firstly, should we be pointing to the SuS instead of POSIX
(there is work going on a new version of the SUS), since it is open,
and readily available on th 'net, and people can readily see it (as
opposed to people who have shelled out $500 for a version)?
Secondly, why should we explicity carve out an exception for
test -a and -o, rather than saying that the XSI extensions need be
supported? The X/Open System Interface is the core application
programming interface for C and sh programming for systems conforming
to the Single UNIX Specification.
+ <item><tt>local</tt> to create a scoped variable must be
+ supported; however, <tt>local</tt> may or may not preserve
+ the variable value from an outer scope and may or may not
+ support arguments more complex than simple variable
+ names</item>
Perhaps a example/footnote needs be inserted here? If I were
writing a script, it would help to be reminded that I can't really
depend on very much of the semantics of local from any specific
implementation.
fname () {
local a # keep it simple
a='' # initialize the variable
.... use a ...
}
is the only safe way to do use a local variable.
manoj
--
Doubt isn't the opposite of faith; it is an element of faith. Paul
Tillich, German theologian.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
Reply to: