1 |
On Thu, 08 Oct 2009 22:22:05 -0400, Jonathan Callen <abcd@g.o> |
2 |
wrote: |
3 |
> -----BEGIN PGP SIGNED MESSAGE----- |
4 |
> Hash: SHA1 |
5 |
> |
6 |
> Neil Bothwick wrote: |
7 |
>> Note you can also nest commands when using $(), which you can't do with |
8 |
>> backticks. |
9 |
> |
10 |
> You can nest commands with ``, it's just less intuitive; each of the |
11 |
> following are equivalent: |
12 |
|
13 |
Thank for calling my attention on that. |
14 |
|
15 |
Yes, I know how it works. I rather meant that you can't nest the backticks |
16 |
in a vanilla fashion, like with $(). Escaping the ticks you can do whatever |
17 |
you want, it's just a matter of making sure the right thing reaches the |
18 |
correct depth in a nested chain of shells, since each time that this kind |
19 |
of substitution it happens in a new subshell. |
20 |
|
21 |
$ pgrep bash | wc -l |
22 |
6 |
23 |
$ echo $(pgrep bash | wc -l) |
24 |
7 |
25 |
$ echo $(echo $(pgrep bash | wc -l)) |
26 |
8 |
27 |
|
28 |
I'll admit I didn't express it in the clearest way. However, this doesn't |
29 |
solve the fact of the accents being dead keys in a lost (most?) languages |
30 |
with a Latin alphabet, but English, nor the problem about the clarity |
31 |
(though that's less an issue when you are working in command line, most |
32 |
times anyway). I have no idea if the accent is a standard character in |
33 |
every keyboard layout, so I am not sure that that is a valid argument on |
34 |
any sane keyboard. I just checked and that accent is even part of the 7 bit |
35 |
ascii table (dec 96), which is as minimal as you can get nowadays unless we |
36 |
are speaking about some exotic embedded stuff or ancient device of the |
37 |
caverns, and in that case, probably the same could apply to $, and even () |
38 |
:P |
39 |
|
40 |
-- |
41 |
Jesús Guerrero |