*BSD News Article 35682


Return to BSD News archive

Xref: sserve comp.unix.user-friendly:2875 comp.unix.solaris:22966 comp.unix.programmer:20039 comp.unix.misc:13892 comp.unix.aux:15536 comp.unix.bsd:14883 comp.unix.aix:44123
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!paladin.american.edu!gatech!swrinde!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: 8 Sep 1994 14:49:48 +0100
Organization: University of Warwick, Coventry, UK
Lines: 35
Distribution: inet
Message-ID: <34n4ps$mg2@sprocket.csv.warwick.ac.uk>
References: <33af70$8rd@usenet.INS.CWRU.Edu> <ROCKWELL.94Sep4164530@nova.umd.edu> <34eppt$919@sprocket.csv.warwick.ac.uk> <ROCKWELL.94Sep5125341@nova.umd.edu>
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 <ROCKWELL.94Sep5125341@nova.umd.edu>, rockwell@nova.umd.edu (Raul
Deluth Miller) writes: 
>Raul Miller:
>. >eval lpr `set | egrep \^lpargs | cut -d= -f2- | while read l; do echo
>. >   \"$l\"; done`
>
>Rob McMahon:
>. Still doesn't work.  I now get the 9 arguments '"x' 'y' 'z"' '"x' 'y' 'z"'
>. '"x' 'y' 'z"'.
>
>Hmm... what sh are you using?  This works fine for me.  Furthermore, I can
>think of no valid reason for it to not work.

Ah, don't know how I produced that result, I did try it, but I can't reproduce
it now.  I probably goofed.  It doesn't work with "s in the variables, though:

$ lpargs1='x"y"z'
$ lpargs2='x"y"z'
$ lpargs3='x"y"z'
$ eval wc `set | egrep \^lpargs | cut -d= -f2- | while read l; do echo \"$l\"; done`
wc: xyz: No such file or directory
wc: xyz: No such file or directory
wc: xyz: No such file or directory
      0       0       0 total
$ 

Where'd me "s go ?

Cheers,

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