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