shell script implementation of man

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Wed Nov 19 18:12:27 UTC 2008


Paul,
All,

On Wednesday 19 November 2008 18:28:33 Paul Smith wrote:
> On Wed, 2008-11-19 at 18:01 +0100, Yann E. MORIN wrote:
> > Do not forget that back-ticks are not POSIX, while $() is.
> Uh... what?!?!  That's absolutely not true.  Backticks are
> unquestionably defined in the POSIX sh definition.  They are not marked
> as "old" or "deprecated" or anything similar.

Woops... Sorry... I was too quick and didn't check. I thought I read that
somewhere, but couldn't find it again. I just checked with:
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02
and you're right.

Next time, I won't trust my memory without checking first. Sorry.

> It's easier to nest command substitutions with $() and there is a very
> slight difference in handling backslashes, but otherwise there is no
> difference between them.

Yes.

> > Even bash considers the use of back-ticks (backquotes) to
> > be /old-style/.
> They don't mean it in a pejorative sense. They just mean it as a 
> description: it _IS_ old-style.  But that doesn't make backticks wrong
> or bad or to be avoided.  Full quote:
>         When the old-style backquote form of substitution is used, ...

I didn't mean it was pejorative. I was just using /old-style/ as quoting
the bash manual.

> Since `` is perfectly standards-compliant AND it's far more portable
> than $(),

What makes you say it's /far more portable than $()/ ? Is that because $()
was introduced after `` (if so is the case)?

> I don't see any reason to avoid `` except as a matter of 
> style.

Right. I do apologise.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'




More information about the busybox mailing list