Le 19.06.2014 16:22, Henrique de Moraes Holschuh a écrit :
On Thu, 19 Jun 2014, berenger.mo...@neutralite.org wrote:
This syntax "$(command)" is not portable.
It is a POSIX shell construct. Anything that doesn't implement it
should
not be linked to /bin/sh in the first place.
So I was wrong. Not really surprising honestly, but I think I have seen
such assertion somewhere else from someone more knowledgeable than me.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
section 2.6.3.
HOWEVER, $(something) and `something` are not equivalent in POSIX,
they have
different behavior re. expansion of "something". The code appears to
be
using $() correctly, though.
What is the difference then? Expansion in shell is a frequent issue for
me when I try to write my scripts.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
https://lists.debian.org/5f2009c37331affe78778ffd16b5b...@neutralite.org