On 2010-08-29 17:12 +1000, Jon Seymour wrote:

> This isn't strictly a bash question, and I'd prefer a POSIX-only
> solution if possible [ suggestions as to a good question to ask
> POSIX-only questions would be appreciated ].

comp.unix.shell

> Suppose I need to encode a list of filenames in a variable and each
> filename may contain spaces, what is good way to encode such a list so
> that the resulting variable is readily compose-able and decodeable? In
> particular, I'd like to avoid the use of (unescaped) separators which
> might themselves be used in the filename.

Depends. Where do those file names come from and how are they
used ? Command line arguments ? File descriptor ? Separated by
NULs or newlines ? One by one or all at once ?

-- 
André Majorel http://www.teaser.fr/~amajorel/

Reply via email to