[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Unsubstituted variables in "jobs" output
From: "Hai Zaar" <haizaar () gmail ! com>
Date: 2008-06-30 21:04:14
Message-ID: cfb54190806301404q45bb055i22942617e5dcf372 () mail ! gmail ! com
[Download RAW message or body]
On Mon, Jun 30, 2008 at 9:23 PM, Chet Ramey <chet.ramey@case.edu> wrote:
>> Consider the following:
>> $ AA=aa; BB=bb; (sleep 10; echo $AA $BB) & jobs
>> [1] 6626
>> [1]+ Running ( sleep 10; echo $AA $BB ) &
>> If there any way tell jobs command to output AA and BB substituted with
>> their values?
>
> The variables are expanded in the subshell, not in the parent shell
> maintaining the jobs table. There's no guarantee that the parent shell
> and the subshell have the same values for AA and BB.
That explains it. Thank you!
--
Zaar
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic