Mail Archives: cygwin/2009/12/30/08:32:20
=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 -