Return to BSD News archive
Xref: sserve comp.unix.user-friendly:2840 comp.unix.solaris:22271 comp.unix.programmer:19760 comp.unix.misc:13766 comp.unix.aux:15332 comp.unix.bsd:14816 comp.unix.aix:43562 Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!pipex!lyra.csx.cam.ac.uk!warwick!not-for-mail From: cudcv@csv.warwick.ac.uk (Rob McMahon) 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 Date: 2 Sep 1994 10:24:34 +0100 Organization: University of Warwick, Coventry, UK Lines: 28 Distribution: inet Message-ID: <346r0i$kn1@sprocket.csv.warwick.ac.uk> References: <33af70$8rd@usenet.INS.CWRU.Edu> <CHRISB.94Aug29144419@wombat.cssc-syd.tansu.com.au> <33vj8d$b4i@sprocket.csv.warwick.ac.uk> <CHRISB.94Aug31104408@wombat.cssc-syd.tansu.com.au> NNTP-Posting-Host: sprocket.csv.warwick.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit In article <CHRISB.94Aug31104408@wombat.cssc-syd.tansu.com.au>, chrisb@wombat.cssc-syd.tansu.com.au (Chris Bitmead) writes: >>The thing I really miss in sh is >> >>set lpargs = ( $lpargs:q $nextarg:q ) > >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 How do you do the next line I had in mind: lpr $lpargs:q (You don't know how many args there will be in advance.) I find myself doing this rather a lot, and always end up using csh (or C). Rob -- UUCP: ...!mcsun!uknet!warwick!cudcv PHONE: +44 203 523037 INET: cudcv@csv.warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England