nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Environment variables - with or without $?

2017-03-23 17:36:38
    Date:        Thu, 23 Mar 2017 17:35:55 -0400
    From:        Paul Fox <pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us>
    Message-ID:  
<20170323213556(_dot_)01E2251811CD(_at_)grass(_dot_)foxharp(_dot_)boston(_dot_)ma(_dot_)us>

  | really?  do tell!

If command (in the example I gave) is a function, posix requires that
X be set in the shell (for subsequent commands) whereas if it is a
binary, X must not be altered from whatever it was before.

In the function case, it is undefined whether (assuming it was not already
exported) X will be marked for export.

This is all just because of the way ksh implemented functions.

Don't rely upon it necessarily being that way, if you want the posix
behaviour do
        X=whatever; X=$X command
then we know X will be set in the shell later.

kre


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>