From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id AAA15360 for ; Sat, 9 Sep 1995 00:53:35 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA07252 (5.65c/Gatech-10.0-IDA for ); Fri, 8 Sep 1995 10:51:22 -0400 Received: by math (5.x/SMI-SVR4) id AA02400; Fri, 8 Sep 1995 10:45:18 -0400 Old-Return-Path: Resent-Date: Fri, 8 Sep 1995 15:46:43 +0100 (BST) Old-Return-Path: From: Zefram Message-Id: <1810.199509081446@stone.dcs.warwick.ac.uk> Subject: Re: help with parameters To: paubert@gaston.unice.fr (Pierre.AUBERT) Date: Fri, 8 Sep 1995 15:46:43 +0100 (BST) Cc: zsh-users@math.gatech.edu (Z Shell users mailing list) In-Reply-To: <9509081251.AA26161@gaston.unice.fr> from "Pierre.AUBERT" at Sep 8, 95 02:51:44 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]6258.07 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"2A5nm2.0.Fb.tR5Km"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/80 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >hello, >i don't understand why the following expression doesn't work > >> da="--date '1 September' +'%A'" ; date $da > >and this one works > >> date --date '1 September' +'%A' The first one sets da to be a single string, and then passes it, as a single argument, to date. The second one passes three separate strings. A possible method that would work is da=(--date '1 September' +'%A') ; date $da which makes da an array of three strings, and passes it, as three arguments, to date. Another possibility is da="--date '1 September' +'%A'" ; eval date $da which I think is closer to what you were trying to do. It makes da a string as you did, then expands it on the eval command line. eval reparses its arguments, interpreting the single quotes embedded in da. -zefram