On 01/05/2016 12:26, Eric Vidal wrote:
> One more question, my knowledge is not sufficient to understand this following command :
> unexport ?
> i'm not understand the ? here
? is the environment variable set by the "foreground" command. It holds
the exit code of the command run in the foreground block. In other words:
"foreground { A } B" will run A, then it will run B with A's exit code
contained in the ? environment variable.
If no program in the rest of the chain is going to use this variable,
it's best to unexport it - especially if the chain is going to fork a lot
(as is the case with init).
> unexport !
Same thing. The ! environment variable is set by utilities like
"background" or "pipeline", and contains the pid of the forked process.
If nothing is going to use the value, better clean up the environment.
--
Laurent
Received on Sun May 01 2016 - 10:34:07 UTC