*BSD News Article 35225


Return to BSD News archive

Xref: sserve comp.unix.user-friendly:2832 comp.unix.solaris:22169 comp.unix.programmer:19708 comp.unix.misc:13741 comp.unix.aux:15289 comp.unix.bsd:14794 comp.unix.aix:43435
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!citecub.citec.qld.gov.au!not-for-mail
From: sgcccdc@citecub.citec.qld.gov.au (Colin Campbell)
Newsgroups: comp.unix.user-friendly,comp.unix.solaris,comp.unix.programmer,comp.unix.misc,comp.unix.aux,comp.unix.bsd,comp.unix.aix
Subject: Re: Shell wars
Followup-To: comp.unix.user-friendly,comp.unix.solaris,comp.unix.programmer,comp.unix.misc,comp.unix.aux,comp.unix.bsd,comp.unix.aix
Date: 1 Sep 1994 09:57:44 +1000
Organization: CITEC
Lines: 40
Distribution: inet
Message-ID: <3435do$2ri@citecub.citec.qld.gov.au>
References: <33af70$8rd@usenet.INS.CWRU.Edu> <33gvms$56a@wombat.cssc-syd.tansu.com.au> <CHRISB.94Aug31104408@wombat.cssc-syd.tansu.com.au>
NNTP-Posting-Host: localhost.citec.qld.gov.au
X-Newsreader: TIN [version 1.2 PL2]

Chris Bitmead (chrisb@wombat.cssc-syd.tansu.com.au) wrote:
: In article <33vj8d$b4i@sprocket.csv.warwick.ac.uk> cudcv@csv.warwick.ac.uk (Rob McMahon) writes:

: >In article <CHRISB.94Aug29144419@wombat.cssc-syd.tansu.com.au>,
: >chrisb@wombat.cssc-syd.tansu.com.au (Chris Bitmead) writes: 

: >>I'll be the first to back up BSD in many areas, but csh would not be one of
: >>them. The design flaws in csh are well documented. What is it that you can do
: >>in csh that you can't do in the bourne flavoured shells?
: >
: >The thing I really miss in sh is
: >
: >set lpargs = ( $lpargs:q $nextarg:q )
: >
: >i.e. some decent way of forming lists without causing problems with spaces,
: >quotes, and backslashes.  Lists are useful throughout csh, and there really is
: >no good substitute in sh.

: I agree that arrays in sh would be nice, but they can still be done quite
: easily with no space problems.
: e.g., to set three items in an array to the value of $XXX (which may have
: spaces):

: XXX='x y z'
: for i in 1 2 3
: do
: eval "MYVAR$i="'$XXX'
: done

: set | grep MYVAR

: MYVAR1=x y z
: MYVAR2=x y z
: MYVAR3=x y z

Of course you could always use ksh. It is upwards (or is that backwards) 
compatible with sh and supports arrays with up to 1024 elements. Oh, and
it is standard with SVR4.

Colin