On 5/6/11 12:00 PM, Greg Wooledge wrote: > 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" ' "${vals[@]}" ; echo >> >> and get the double-quoting you want. > > Fails horribly if the array elements contain double quotes of their own.
Read what I wrote: "For straight debugging output, it's probably ok." Presumably Steven understands something about the expected values and will be able to cope with a stray double-quote. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/