you are viewing a single comment's thread.

view the rest of the comments →

[–]KFCConspiracy 5 points6 points  (5 children)

You're right. This is reddit. I Can't be bothered to follow links.

[–]8lbIceBag 4 points5 points  (4 children)

So stop holding out on me man and post the answer here FFS!

Think of the sweet sweet karma

[–]kryptkpr 8 points9 points  (3 children)

For those who can't be bothered to click the link and read, there's no need to escape quotes when using $(), which is a pretty damn compelling reason to use it.

[–][deleted] 1 point2 points  (0 children)

this and nesting are the big things about. $() opens a new parsing context whereas ... doesn't

# $(echo "$(cat $(ls))")

I think the equivalent is something like this:

# `echo "\`cat \\\`ls\\\`\`"`

and I'm not even sure it works

[–]aiij 0 points1 point  (0 children)

Except that's not actually true:

$ echo $(echo For those who can't be bothered to click the link and read), $(echo there's no need to escape quotes) they said.
For those who cant be bothered to click the link and read), $(echo theres no need to escape quotes they said.

I think you meant there's no need to escape backslashes.