[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bourne Shell Extensions [was Re: shell scripting book]
- To: Shlomi Fish <shlomif(at-nospam)techst02.technion.ac.il>
- Subject: Re: Bourne Shell Extensions [was Re: shell scripting book]
- From: Shaul Karl <shaulka(at-nospam)bezeqint.net>
- Date: Fri, 27 Jul 2001 15:08:44 +0300
- cc: "Nadav Har'El" <nyh(at-nospam)math.technion.ac.il>, ILUG <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: Message from Shlomi Fish <shlomif@techst02.technion.ac.il> of "Fri, 27 Jul 2001 07:30:02 +0300." <Pine.GSO.4.33.0107270725120.6191-100000@techst02.technion.ac.il>
- References: <Pine.GSO.4.33.0107270725120.6191-100000@techst02.technion.ac.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
>
> 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 believe that $(...) is considered a better replacement for the `...`
construct, which is supported by the System Vi /bin/sh.
Note that this is a different quote character then "'", which can be used to
escape the shell expansion feature:
[15:01:36 tmp]$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
[15:02:44 tmp]$ echo '$PATH'
$PATH
[15:02:48 tmp]$ echo `$PATH`
bash: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games: No such file or
directory
[15:02:53 tmp]$ echo `date`
Fri Jul 27 15:02:58 IDT 2001
[15:02:58 tmp]$
> 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.
>
> Regards,
>
> Shlomi Fish
>
>
>
> ----------------------------------------------------------------------
> Shlomi Fish shlomif@t2.technion.ac.il
> Home Page: http://t2.technion.ac.il/~shlomif/
> Home E-mail: shlomif@techie.com
>
> A more experienced programmer does not make less bugs. He just realizes
> what went wrong more quickly.
>
>
> =================================================================
> 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
>
--
Shaul Karl <shaulka@bezeqint.net>
=================================================================
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