From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with ESMTP id VAA29754 for ; Mon, 11 Dec 1995 21:16:56 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA14903; Mon, 11 Dec 1995 04:52:25 -0500 (EST) Resent-Date: Mon, 11 Dec 1995 04:52:25 -0500 (EST) Message-Id: <12885.9512110952@pygmy.swan.ac.uk> To: sverre@research.nokia.com (Sverre Slotte) Cc: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: Strange behaviour in zsh-2.5.03 In-Reply-To: "sverre@research.nokia.com"'s message of "Mon, 11 Dec 95 10:44:03 +0200." <9512110844.AA02049@nike.spices> Date: Mon, 11 Dec 95 09:52:21 +0000 From: P.Stephenson@swansea.ac.uk X-Mts: smtp Resent-Message-ID: <"QOUig3.0.ne3.Oz_om"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/686 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu sverre@research.nokia.com wrote: > Hi, > > I'm running zsh version 2.5.03 on a Sun SparcStation 4 w/ Solaris 2.4. > > I have a shell function called "lpr" that acts as a front-end to > /usr/ucb/lpr. It lets me specify the printer I want in a "localised" > fashion: -Pf and -Pc stand for fax-room printer and coffee-room > printer, respectively. Unfortunately, it fails in a mysterious manner. Here's the problem... > * ) > passthru="$passthru $1" ... > command lpr -P${printer} ${passthru} # this doesn't work! it's shell word splitting. You're trying to print " foo.ps". Use ${=passthru} and everything should be OK. Even better, make passthru an array: that's what they're there for: passthru=($passthru $1) or if it has to work with ksh too, set -A passthru $passthru $1 -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.