Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2001 00:45:16 +0100
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        questions@FreeBSD.ORG
Subject:   Re: sh/csh example scripts
Message-ID:  <20011203004516.C2208@raggedclown.net>
In-Reply-To: <06wv06p8fm.v06@localhost.localdomain>
References:  <200112012319.PAA00437@idk.com> <06wv06p8fm.v06@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 01, 2001 at 08:11:57PM -0800, Gary W. Swearingen wrote:
> Tony <tony@idk.com> writes:
> 
> > I am trying to learn writing shell scripts. 
> 
> That's the best way to learn shell script writing.
> 
> > What I am looking for is 1 (or more) that has a lot of examples...
> 
> This shell command will find many examples:
> 
> locate . | grep "\.[c]*sh$"
> 
> This will find more:
> 
> find / | xargs egrep "^#!/bin/(csh|sh)"
> 
There are also squillions of books...

Be aware there are many shells.
Basically there are Bourne Shell 'derivatives', sh (vanilla and BSD),
ksh (Korn shell, sh + many extras), bash (sh + ksh + many extras),
zsh (not very well known but reputed to be the bees-knees of all shells)

Then there is 'csh' which ---> tcsh. Tcsh and Bash are probably the two
to choose from for interactive use.
The "(t)csh" is generally considered to be a very bad choice for scripts
due to it's arcane complexity. For interactive use tcsh/bash offer much
the same facilities but are different enough to be a pain.

-- 
Regards
Cliff



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011203004516.C2208>