bug-bash
[Top][All Lists]
Advanced

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

Re: variable assignment in string returning function


From: Marc Herbert
Subject: Re: variable assignment in string returning function
Date: Wed, 27 Jan 2010 13:13:44 +0000
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

Sharuzzaman Ahmat Raslan a écrit :
> 
> Somehow, the backtick for foo() execute the function, echoing the correct
> output, but fails to set the variable $gang to the correct value.

The variable is set, but in a different sub shell. backticks fork a sub shell.

By the way $( ) is preferred to backticks, see FAQs





reply via email to

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