Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Printing arrays for use with $()



On Fri, Aug 12, 2005 at 12:28:47AM +0200, DervishD wrote:
>     The thing is that the 'printf' command prints the file names
> exactly as I want them, within double quotes, but 'command' see those
> double quotes... quoted. Any way of avoiding this?

That's what "eval" is for -- it will re-evaluate the string, and the
quotes will affect how the string is parsed into a command:

    eval "command" $(printf '"%s" ' $array)

..wayne..



Messages sorted by: Reverse Date, Date, Thread, Author