This is the mail archive of the
cygwin-talk
mailing list for the cygwin project.
Re: bash scripting nightmare.
On Thu, 10 Aug 2006, mwoehlke wrote:
> Dave Korn wrote:
> > On 10 August 2006 20:49, mwoehlke wrote:
> >
> > > > [snip examples]
> > > It sounds like you want to read up on arrays and "$@" (quotes
> > > included).
> >
> > > Does that help?
> >
> > I haven't had time to try it yet, but yes, I'm sure that'll do the
> > trick. Thanks a bundle for the hints!
>
> Glad to help!
>
> (If you don't need the arrays, you can still be portable, too; I'm
> fairly sure "$@" is required by POSIX which means even most of the
> cruddy shells should support it. At any rate, I know *we* use it in
> portable scripts, and we run into a lot of cruddy shells :-).)
I was also initially thinking "arrays", but supposing that you *do* need
to embed everything in one parameter, the eval builtin is your friend.
HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"