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

Re: [off topic] Learning Shell from an old UNIX book



On Tue, Mar 11, 2003 at 05:41:46PM +0200, Aryan Ameri wrote:
> 1 ) Can this book be beneficial for me? or is it so obsolete that it is not 
> useful anymore?

Certainly if you use it and the contents does not bore you :-)

> The book shows examples for all of these tree shells. Therefore I wonder 
> 2 ) Bash is more similar to which one of these Shells? Korn Bourne or C ? 

If I over simplify, BASH has all Bourne shell things and most Korn shell
features. Following are rough guide lines and you need to check minor
differences yourself.

BASH also had added some c-shell features added too.

Bourne shell ------------------+--+--> BASH
      \--------> Korn Shell.../  /
                                /
      .......... C-Shell.......:

C-SHELL is different but SH/BASH/KSH/ZSH are all Bourne shell families :-)

BASH accepts some C-SHELLism such as "if [ x == y ] ;" while real bourne
shell suppose to accept only "if [ x = y ] ;"

> 3) What things shall I keep in mind when reading example programs. Do commands 
> on Korn, Bourne and C, usually work on Bash? Or is Bash using a completely 
> different syntax? 

Many commands in C-SHELL do not work on BASH.  If you want C-SHELL on
Debian, install "tcsh" package. (Oh, now Debian also has OPenBSD "csh"
package too.)

Bourne shell command should work on BASH (or ASH or DASH if you want
strict Bourne shell limitation.)  BASH is superset of Bourne shell.

Most modern style Korn shell commands should work on BASH but if you
really want KSH on Debian, "pdksh" package should give you one.  

Learning differences of these shells may be quite educational.

Have fun.
-- 
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
        Osamu Aoki <osamu@debian.org>   Cupertino CA USA, GPG-key: A8061F32
 .''`.  Debian Reference: post-installation user's guide for non-developers
 : :' : http://qref.sf.net and http://people.debian.org/~osamu
 `. `'  "Our Priorities are Our Users and Free Software" --- Social Contract



Reply to: