bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push cannot be redirected in 4.1.5


From: Chet Ramey
Subject: Re: push cannot be redirected in 4.1.5
Date: Wed, 30 Apr 2014 16:39:28 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 4/30/14, 4:34 PM, Viktor Szépe wrote:
> echo first $$ >&2 | bash -c 'echo second $$'
> first 30551
> second 28057
> 
> but 
> 
> eval 'echo first $$' >&2 | eval 'echo second $$'
> first 30551
> second 30551

$$ doesn't change in a subshell environment.  It changes in your first
example because you're starting a new shell instance.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]