*BSD News Article 35488


Return to BSD News archive

Xref: sserve comp.unix.user-friendly:2858 comp.unix.solaris:22538 comp.unix.programmer:19864 comp.unix.misc:13821 comp.unix.aux:15427 comp.unix.bsd:14851 comp.unix.aix:43800
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!ihnp4.ucsd.edu!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: 4 Sep 1994 19:25:38 +0100
Organization: University of Warwick, Coventry, UK
Lines: 24
Distribution: inet
Message-ID: <34d3f2$ca@sprocket.csv.warwick.ac.uk>
References: <33af70$8rd@usenet.INS.CWRU.Edu> <CHRISB.94Aug31104408@wombat.cssc-syd.tansu.com.au> <346r0i$kn1@sprocket.csv.warwick.ac.uk> <ROCKWELL.94Sep2081402@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.94Sep2081402@nova.umd.edu>, rockwell@nova.umd.edu (Raul
Deluth Miller) writes: 
>. How do you do the next line I had in mind:
>. lpr $lpargs:q
>
>lpr `set | egrep \^lpargs | cut -d= -f2-`

Sorry, it doesn't work.  This splits all the arguments at white space
(returning 9 arguments "x" "y" "z" "x" "y" "z" "x" "y" "z" instead of 3 "x y
z" "x y z" "x y z" in the example.  Using quotes:

lpr "`set | egrep \^lpargs | cut -d= -f2-`"

(which would work in csh) results in just one argument

"x y z
x y z
x y z"

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