[NCLUG] /etc/environment

Alan Silverstein ajs at frii.com
Sun Aug 19 16:51:58 MDT 2007


> Note that in today's modern shells I would recommend doing math
> directly in $((...)) expressions.

And other shell expansions, using $(...), rather than ``, which are
harder to read (in my opinion), and don't nest.  The addition of $() was
a great leap forward.  Example:

    foo="$(echo 'abc' $(wc -l bar))"

Dunno if the "" are necessary, but they don't hurt, might be needed in
some cases, and make it easier to read (again, in my opinion).

Alan Silverstein



More information about the NCLUG mailing list