[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bourne Shell Extensions [was Re: shell scripting book]



On Fri, Jul 27, 2001 at 07:30:02AM +0300, Shlomi Fish wrote:
> 
> As I found out, there are some features of all of ash, bash and zsh which
> are not supported by the System Vish /bin/sh's. For instance, I noticed
> that the $(sub-shell) output capture was not supported. AFAIK, $(...) was
> introduced by the Korn Shell and some free Bourne shells copied it.
> 
> I am planning to give a lecture about Bourne shell programming to the
> Haifa Linux Club. What I am going to do is to explain some extensions but
> to clearly mention that they are not in the POSIX standard and that they
> are not supported by ash and/or the System V'ish /bin/sh's.

I consider some shell extensions important features that might
be very useful when needed. Others are simply syntactic sugar 
that doesn't add much to the language, just harms portability,
such as the $() thing (too bad ksh isn't the standard though, 
as $() is much less braindamaged than ``).

Other features are really only useful for interactive shells, such
as bash's process redirection, <() and >(). Arguably they could
also be well used in a script, but unless you are willing to 
program your shell script as if it were a Scheme program, it won't 
make it very legible.

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il