[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yet another quoting question

From: Greg Wooledge
Subject: Re: Yet another quoting question
Date: Fri, 6 May 2011 12:00:16 -0400
User-agent: Mutt/

On Fri, May 06, 2011 at 11:50:34AM -0400, Chet Ramey wrote:
> Eric suggested %q, and that works to a
> certain degree, but you can also use
> printf '"%s" ' "address@hidden" ; echo
> and get the double-quoting you want.

Fails horribly if the array elements contain double quotes of their own.

Realistically, I do NOT advise even attempting this.  Do not try to write
general functions that operate on arrays, passed by name.  Bash truly
does not have the tool set to cope with this.  I can't stress this
strongly enough.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]