[Linux-disciples] Including the results of a program in a prompt
Dylan Thurston
dpt at bostoncoop.net
Mon Nov 22 12:09:09 EST 2004
On Mon, Nov 22, 2004 at 10:37:14AM -0500, Adam Rosi-Kessel wrote:
> Double quotes don't escape backticks.
>
> Single quotes do.
>
> There is a long history of this behavior. I may be mistaken, but I
> think this is the primary difference between double and single quotes
> for escaping in bash (aside from, of course, the fact that with double
> quotes you don't need to escape internal single quotes and vice versa).
Well, as part of the same difference, single quotes escape shell
substitutions and double quotes do not:
dpt at lotus:~$ echo $SHELL
/bin/bash
dpt at lotus:~$ echo "$SHELL"
/bin/bash
dpt at lotus:~$ echo '$SHELL'
$SHELL
Peace,
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041122/3cf77af6/attachment.pgp
More information about the Linux-disciples
mailing list