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

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



> 
> 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