www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/30/08:32:20

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00
X-Spam-Check-By: sourceware.org
From: "Jason Pyeron" <jpyeron AT pdinc DOT us>
To: <cygwin AT cygwin DOT com>
References: <000801ca88a9$ec71c510$c5554f30$@com> <20091230120129 DOT GA32652 AT calimero DOT vinschen DOT de> <f60fe000912300512r5e1f11di34e7c30e29027d0 AT mail DOT gmail DOT com>
Subject: RE: cygpath and spaces in filenames when reading from a file
Date: Wed, 30 Dec 2009 08:35:43 -0500
Message-ID: <0B126B98FCA8429FB63676EF4772ACAA@phoenix>
MIME-Version: 1.0
In-Reply-To: <f60fe000912300512r5e1f11di34e7c30e29027d0@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

=20

> -----Original Message-----
> From: Behalf Of Mark J. Reed
> Sent: Wednesday, December 30, 2009 8:12
> Subject: Re: cygpath and spaces in filenames when reading from a file
>=20
> On Wed, Dec 30, 2009 at 7:01 AM, Corinna Vinschen  wrote:
> > No, it doesn't. =A0Space is used as the field separator in=20
> the file. =A0I=20
> > assume we need an extension like allowing to specify=20
> another separator.
> > Another one for next year...
>=20
> As a first step, maybe just adding an xargs-style "--null/-0"=20
> to treat input as NUL-separated instead of=20
> whitespace-separated would be worthwhile?
>=20
> The options list is kinda full, single-letter-alias-wise; I=20
> see no obvious place to put a more general '--delimiter' (-d=20
> and -D and -f and -F and -s and -S are all taken).  Also,=20
> allowing specification of an arbitrary delimiter would seem=20
> to open up another can of character-encoding worms.

You could even treat the -0 in the future just like the perl record seperat=
or
option syntax.

=46rom man perl-opt:

-0digits=20
specifies the record separator ($/) as an octal number. If there are no dig=
its,
the null character is the separator. Other switches may precede or follow t=
he
digits. For example, if you have a version of find which can print filenames
terminated by the null character, you can say this:=20
    find . -name '*.bak' -print0 | perl -n0e unlink

The special value 00 will cause Perl to slurp files in paragraph mode. The =
value
0777 will cause Perl to slurp files whole since there is no legal character=
 with
that value.=20




>=20
> --
> Mark J. Reed <markjreed AT gmail DOT com>
>=20
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>=20
>=20


--
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
This message is copyright PD Inc, subject to license 20080407P00.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019