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


Groups > gnu.bash.bug > #14738 > unrolled thread

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

Started byChet Ramey <chet.ramey@case.edu>
First post2018-10-24 15:04 -0400
Last post2018-10-24 15:04 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

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

FromChet Ramey <chet.ramey@case.edu>
Date2018-10-24 15:04 -0400
SubjectRe: GNU Bash v.4.4.23-5 built-in function 'set' produces variable outputs
Message-ID<mailman.2682.1540408031.1284.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web