On Sun, Feb 20, 2011 at 1:42 PM, David Demelier <demelier.da...@gmail.com> wrote: > > I'd prefere $() rather than ``. It's more powerful, for example you can > write a multiple $() but not `` see :
that's not true for i in bash dash mksh; do echo $i: $i <<'!' echo `echo 1\`echo 2\\\`echo 3\\\\\\\`echo 4\\\\\\\`\\\`\`` ! done bash: 1234 dash: 1234 mksh: 1234 > > markand@Abricot ~ $ echo $(basename $(which dmesg)) > dmesg > > markand@Abricot ~ $ echo `basename `which dmesg`` > usage: basename string [suffix] > basename [-a] [-s suffix] string [...] > which dmesg > > Of course the example code is useless but shows the limitations of ``. > Nowadays all shells supports $() so I advise you to use it :). no, not all shells support $() > > Cheers, > > -- > David Demelier > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"