From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7897 invoked from network); 13 Oct 2000 15:49:02 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Oct 2000 15:49:02 -0000 Received: (qmail 27118 invoked by alias); 13 Oct 2000 15:48:22 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3451 Received: (qmail 27111 invoked from network); 13 Oct 2000 15:48:22 -0000 From: "Jack McKinney" Date: Fri, 13 Oct 2000 10:48:19 -0500 To: zsh-users@sunsite.auc.dk Subject: converting parameter to words Message-ID: <20001013104819.A32478@stocks.pillory.com> Mail-Followup-To: zsh-users@sunsite.auc.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i -----BEGIN PGP SIGNED MESSAGE----- I have a script that I want to pass multiple arguments to. These arguments, however, need to appear with a '-r' in front of them in the command executed inside the script. For example, if I do this: $ example this that other The script will need to execute command -r this -r that -r other One thought on this was: #!/bin/zsh for i do temp="$temp -r $i" done command $temp Of course, this doesn't work because zsh passing the string inside $temp as a single argument to the program, instead of parsing it for words. From the man page, it sounds like ${^temp} or ${=temp} should work, but neither does. - -- "Restore your inalienable human rights. Jack McKinney Vote Libertarian. http://www.lp.org http://www.lorentz.com http://www.harrybrowne2000.org F4 A0 65 67 58 77 AF 9B FC B3 C5 6B 55 36 94 A6 jackmc@lorentz.com -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBOecuukZx0BGJTwrZAQH/6AP/bVpZf0bL4rivlVLVAaSeI+DHbq4z5860 qx6RxhNJWOZSfmlv00F+XrVG6iOogr8tQ9V74QkIY6MssA7QVmpOcFCYYIdyfu9V RFftK1PgvcUzwAO+qUmzpWySjxMWAuYY5Wr5UYJQjg/mmpwVDZ/fWY9DW4Wnrshn pwrS9eRgUEE= =u3lq -----END PGP SIGNATURE-----