> -----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 > > On Wed, Dec 30, 2009 at 7:01 AM, Corinna Vinschen wrote: > > No, it doesn't. Space is used as the field separator in > the file. I > > assume we need an extension like allowing to specify > another separator. > > Another one for next year... > > As a first step, maybe just adding an xargs-style "--null/-0" > to treat input as NUL-separated instead of > whitespace-separated would be worthwhile? > > The options list is kinda full, single-letter-alias-wise; I > see no obvious place to put a more general '--delimiter' (-d > and -D and -f and -F and -s and -S are all taken). Also, > allowing specification of an arbitrary delimiter would seem > to open up another can of character-encoding worms.
You could even treat the -0 in the future just like the perl record seperator option syntax. From man perl-opt: -0digits specifies the record separator ($/) as an octal number. If there are no digits, the null character is the separator. Other switches may precede or follow the digits. For example, if you have a version of find which can print filenames terminated by the null character, you can say this: 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. > > -- > Mark J. Reed <markjr...@gmail.com> > > -- > 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 > > -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 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