Detecting text type in a shell script
Max Bowsher
maxb@ukf.net
Thu Feb 6 19:33:00 GMT 2003
Nicolas Christin wrote:
> On Thu, 6 Feb 2003, Max Bowsher wrote:
>
>> Have you tried linking you app with -lbinmode ? That should force all
>> file access to be binary, whatever the mount.
>
> No - but that's a very good point - worth trying out. Thanks a bunch.
You haven't said exactly what your program does, so I can't be sure, but
there is also -lautomode, which (IIRC) does text reads and binary writes.
Remember - When reading in binary mode, your program may receive \r\n line
terminations if that is what the file actually contains.
Max.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list