just another question

Vu Pham vu at sivell.com
Sun Apr 26 17:05:05 PDT 2009


IAN STEPHEN wrote:
> 
> ----- Original Message -----
> From: vu pham <vu at sivell.com>
> 
>> Is there any difference between using a=$(command) and  
>> a=`command` ?
> 
> The $(command) way treats all characters inside the braces literally while the backticks way uses the backslash \ character to escape $, `, and \.
> 
> Nested substitutions are (I think) easier to read using $(command).  Some older(?) shells don't allow use of $(command) so backticks may be more portable.
> 

Ian, thanks for the explanation. I use bash scripts sometimes but I have 
to admit that I do not fully understand it.

Vu



More information about the Linux-users mailing list