From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14236 invoked from network); 30 Jun 2000 11:40:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Jun 2000 11:40:25 -0000 Received: (qmail 15368 invoked by alias); 30 Jun 2000 11:39:56 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3237 Received: (qmail 15358 invoked from network); 30 Jun 2000 11:39:54 -0000 Date: Fri, 30 Jun 2000 13:39:48 +0200 (MET DST) Message-Id: <200006301139.NAA00844@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: Mircea Damian's message of Fri, 30 Jun 2000 14:27:52 +0300 Subject: Re: please advice Mircea Damian wrote: > Hello, > > I'm trying to use and old bash script and port it to zsh. > It now basically does: > > #!/bin/zsh > > > if [ $# -gt 0 ]; then > echo "Number of arguments: $#" > exit > fi > > PRGARG="-bla1 -bla2 -bla3" > > $0 $PRGARG > > > In zsh the number of arguments will be 1. How can I expand(?) it to three > as bash does? One of the places where zsh differs from other shells, doing the right thing. One possibility is to set the shwordsplit option, if you really want it everywhere. Our you can force word splitting for that one parameter expansion by using: `$=PRGARG'. The best way would be to use an array, though. PRGARG=(-bla1 -bla2 -bla3) $0 $PRGARG Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de