bug-bash
[Top][All Lists]
Advanced

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

Re: Unsubstituted variables in "jobs" output


From: Hai Zaar
Subject: Re: Unsubstituted variables in "jobs" output
Date: Tue, 1 Jul 2008 00:04:14 +0300

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




reply via email to

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