On 10/24/18 2:51 AM, Robert Elz wrote:
> I have complained about this (in private) to Chet before ... there are > times when I want to run commands with a complely empty environment, > but no matter how I try to make it go away, that _ keeps sticking its > nose in... The rest of what bash (by default) adds to the environ > (like SHLVL as one example) can be removed by unset, but not _ > (though "unset _" does not fail.) Of course not -- it succeeds. Bash simply sets the variable again. This is one of the special things about _. > Note that it isn't really even following its doc, here, among its > uses, this one would be from ... > > expands to the last > argument to the previous command, after expansion. > > which for the second "set | grep" above, was the previous > "set | grep SSL" and the last arg there was "SSL" which should > have matched the grep pattern. Sloppy documenting, though ksh93 uses the same language: it really means `simple command', and foreground simple commands at that. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/