Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14738

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs
Date 2018-10-24 15:04 -0400
Message-ID <mailman.2682.1540408031.1284.bug-bash@gnu.org> (permalink)
References (3 earlier) <CAM_8-CiC=2-wY+y9GpRutzuOhom3q5ayS54sdH=F_w106WMj4Q@mail.gmail.com> <20181019195026.mmtktfswn3evxvlw@eeg.ccf.org> <10646.1540187682@jinx.noi.kre.to> <13504.1540278539@jinx.noi.kre.to> <1614.1540363880@jinx.noi.kre.to>

Show all headers | View raw


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    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs Chet Ramey <chet.ramey@case.edu> - 2018-10-24 15:04 -0400

csiph-web