-1

Possible Duplicate:
Shell Programming: What's the difference between $(command) and command

It seems there is no difference between

$()

and

``

For example,

$(date)

is the same as

`date`

Any suggestion ?

Community
  • 1
  • 1
爱国者
  • 4,298
  • 9
  • 47
  • 66

1 Answers1

2

What's the difference between man command and stackoverflow.com? :)

When the old-style backquote form of substitution is used, backslash retains its literal meaning except when followed by $, `, or \. The first backquote not preceded by a backslash terminates the command substitution. When using the $(command) form, all characters between the parentheses make up the command; none are treated specially.

so, if you put date inside, it's more or less the same.

Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173