You are not logged in.
Are they the same? Do they pose the same security risks in a PKGBUILD?
Offline
I always used the latter one.... but i think they're both two ways of the same thing...
Offline
ditto what iphitus said. I'm not sure how you mean with "security risk" though, what are you trying to do with it?
Offline
if i put `rm -rf /` in it for example and the pkgbuild is parsed...
Offline
They are the same, but IIRC $(...) is the preferred method
v/r
Suds
Offline
They are the same, but IIRC $(...) is the preferred method
Not exactly the same. Try:
arg=foo
echo `echo $arg`
echo $(echo $arg)
This will yield:
foo
$arg
There is no difference when not using backslash escape character. Best check GNU Info manual.
Jürgen
Offline
The $() syntax is bash, the backtick syntax is older sh, though of course bash supports it. THe reason bash included the $() syntax is that its easier to nest. So use $() when possible but if you need to deal with sh, use backticks.
Dusty
Offline
I understand that $() is preferred for bash. Use:
arg=foo
echo `echo $arg`
echo $(echo $arg)
Offline