gniourf@somewhere:~$ echo `echo `echo hello``
You know, in more modern bash, we use $(...)
instead of `...`
. So what do you think of the previous line? Which of the following two possibilities is it?
gniourf@somewhere:~$ echo $(echo $(echo hello)) # Possibility 1
gniourf@somewhere:~$ echo $(echo )echo hello$() # Possibility 2
You'll figure it out by yourself, but you probably understand that the $(...)
is more robust, since it doesn't leave any ambiguity whatsoever: nestings are neat!
Cheers!
No comments:
Post a Comment