zsh-users
 help / color / mirror / code / Atom feed
* converting parameter to words
@ 2000-10-13 15:48 Jack McKinney
  2000-10-13 16:16 ` Nemeth Ervin
  0 siblings, 1 reply; 5+ messages in thread
From: Jack McKinney @ 2000-10-13 15:48 UTC (permalink / raw)
  To: zsh-users

-----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-----


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-10-13 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-13 15:48 converting parameter to words Jack McKinney
2000-10-13 16:16 ` Nemeth Ervin
2000-10-13 18:23   ` Bart Schaefer
2000-10-13 20:02     ` Jack McKinney
2000-10-13 19:53   ` Jack McKinney

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).