Skip to main content
9 events
when toggle format what by license comment
Apr 13, 2018 at 4:32 vote accept Tim
Apr 12, 2018 at 21:10 comment added Tim "It also has the special property of not being exportable, which is enforced every time a command is executed". When a bash process executes a command, if bash doesn't add _ to its own environment, why does it need to drop it from its own environment? (That is also the motivation of my new post)
Apr 12, 2018 at 13:15 comment added Stephen Kitt No; other parameters aren’t variables anyway.
Apr 12, 2018 at 13:08 comment added Tim Does the same thing happen to other parameters, besides _ ?
Apr 12, 2018 at 12:59 comment added Stephen Kitt See my updates.
Apr 12, 2018 at 12:58 history edited Stephen Kitt CC BY-SA 3.0
Address the comments.
Apr 12, 2018 at 12:57 comment added Tim when starting bash --norc, _ is in the environment of the new shell, so it has the exported flag. But it also has the property of not being exportable. How can I check both exported flag and non-explorable property? Do they co-exist on _ all the time?
Apr 12, 2018 at 12:27 comment added Tim Thanks. Normally, when we reassign a value to an environment parameter, the parameter remains in the environment but with a different value. So what makes _ not behave like that?
Apr 12, 2018 at 12:12 history answered Stephen Kitt CC BY-SA 3.0