[Top][All Lists]

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

Re: [Gnu-arch-users] ANNOUNCE: Spaces in filenames, finished

From: Jan Hudec
Subject: Re: [Gnu-arch-users] ANNOUNCE: Spaces in filenames, finished
Date: Wed, 17 Mar 2004 10:27:12 +0100
User-agent: Mutt/

On Wed, Mar 17, 2004 at 13:03:34 +1100, address@hidden wrote:
> On Tue, Mar 16, 2004 at 10:50:53AM +0100, Jan Hudec wrote:
> > > Filenames may contain newlines.  Now *that* complicates shell scripting.
> > 
> > Though does not make impossible -- IIRC the read builtin has un-quoting
> > capability, so when you use read + looping constructs + proper quoting
> > conversion, it's doable.
> I hadn't heard of reads unquoting before.
> Do you have an example?

Sure it has, but a bit limited. When it reads a \, the next character is
read as is and the \ discarded. Unfortunately, newline is an exception
-- it is discarded too. I've just tried it and it does not seem all that
useful. It can only quote the separation character when reading multiple

Proper quotation can do a little more, actualy. But it still strips
trailing whitespace. Unfortunately, all of it, not just one \n. This can
be fixed using the ${foo%x} syntax, but is a bit cumbersome.

                                                 Jan 'Bulb' Hudec 

Attachment: signature.asc
Description: Digital signature

reply via email to

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