nmh-workers
[Top][All Lists]
Advanced

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

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


From: Paul Fox
Subject: Re: [Nmh-workers] Environment variables - with or without $?
Date: Thu, 23 Mar 2017 18:45:07 -0400

robert wrote:
 >     Date:        Thu, 23 Mar 2017 17:35:55 -0400
 >     From:        Paul Fox <address@hidden>
 >     Message-ID:  <address@hidden>
 > 
 >   | 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.

ah!  thanks.  in your first message you wrote:
 >         X=foo command
 > sets X, and exports it, for command only (provided command is a real
 > binary, if it is a sh function different rules apply, for no good reason
 > at all.)

somehow i interpreted "sh function" as "sh script" (which also
contrasts nicely with "real binary").  so i thought the difference you
were referring to had to do with whether command was an executable or
not.  that would have surprised me greatly.

but in any case, i'd never really considered what happens if command
is a function, so thanks for this small digression.

paul
=----------------------
paul fox, address@hidden (arlington, ma, where it's 30.0 degrees)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]