home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
- Subject: Re: The Revenge of CSH
- Message-ID: <9236508.12113@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Computer Science, University of Melbourne, Australia
- References: <Bzz748.GDK@csn.org> <HUANG1.92Dec29101449@husc11.harvard.edu>
- Date: Tue, 29 Dec 1992 21:12:26 GMT
- Lines: 46
-
- huang1@husc11.harvard.edu (Howard Huang) writes:
-
- >bazyar@teal.csn.org (Jawaid Bazyar) writes:
- >
- > I am continually shocked and dismayed to see people not have
- > command line editing, arrow-key history, job control, or many
- > of the other things that csh (tcsh) provides and /bin/sh does not.
- >
- >Most people (I think) agree that csh is better as an _interactive_
- >shell than sh. The tchrist article specifically focuses on csh
- >_programming_.
- >
- > [...list of things csh doesn't have...]
- > Possibilities that could be added to csh, if anyone cared to.
- > ...
- > Okay, add a read statement to csh.
- >
- >Isn't this what Tom is trying to say? Of course new features can be
- >added, but then the thing will cease to be csh; it'll be a nonstandard
- >derivative (for a while at least). People could add history, aliases
- >and job control to sh, too.
-
- ... and what's more, they have.
- Try bash, it's really a very nice interactive shell, *and* also
- a good script programming language.
-
- >I must say that it would be nice if Bourne shell could do @ i++,
- >instead of $i=`expr $i + 1`.
-
- In bash, you can do
- let i=i+1
- or you can even declare a particular variable as an integer, in which
- case all assignments are treated as 'let' statements:
- declare -i counter
- ...
- counter=counter+1
- but when programming anything more than a one-off, it's usually best
- to stick to the portable /bin/sh functionality rather than the bash
- extensions. You get used to i=`expr $i + 1` pretty soon, it's probably
- no more difficult than getting used to i++ after Pascal's i := i + 1.
-
- --
- Fergus Henderson fjh@munta.cs.mu.OZ.AU
- This .signature virus is a self-referential statement that is true - but
- you will only be able to consistently believe it if you copy it to your own
- .signature file!
-