1 |
On Thu, 8 Oct 2009 19:33:01 +0100, Neil Bothwick <neil@××××××××××.uk> |
2 |
wrote: |
3 |
> On Thu, 08 Oct 2009 18:54:26 +0300, Nikos Chantziaras wrote: |
4 |
> |
5 |
>> And it's usually quicker to type with backticks instead of $(): |
6 |
> |
7 |
> But nowhere near as clear. |
8 |
> |
9 |
>> Note: not single-quotes ('), but backticks (`). It's usually the key |
10 |
>> above TAB and to the left of 1. |
11 |
> |
12 |
> I rest my case :) |
13 |
> |
14 |
> Note you can also nest commands when using $(), which you can't do with |
15 |
> backticks. |
16 |
|
17 |
Note also that some languages and keyboard layouts don't favor the use of |
18 |
the backticks for this case. In Spanish keyboards, this characters: `´^¨ |
19 |
are dead keys (I think that's the correct term, not 100% sure), which means |
20 |
they don't print anything until you press another key. That means that to |
21 |
write `foo` I have to actually type `[space]foo`[space], or at least |
22 |
``foo`` (press the key twice). An in any case it's just a matter of tastes. |
23 |
Besides that, $() is far clearer, and it allows you to do things like this: |
24 |
|
25 |
echo $(ls -l $(which tar)) |
26 |
|
27 |
Just an useless example. That, you can't do with backticks. |
28 |
|
29 |
-- |
30 |
Jesús Guerrero |