Pan ruochen wrote:
Hi All,
I do as the manual (http://cygwin.com/cygwin-ug-net/using-textbinary.html) says:
When redirecting, the Cygwin shells uses rules (a-e). For these shells
the relevant value of CYGWIN is that at the time the shell was
launched and not that at the time the program is executed. Non-Cygwin
shells always pipe and redirect with binary mode. With non-Cygwin
shells the commands cat filename | program and program < filename
are not equivalent when filename is on a text-mounted partition.
I have edited c:\cygwin\cygwin.bat as:
@echo off
set CYGWIN=binmode
C:
chdir C:\cygwin\bin
bash --login -i
After I relaunch cygwin and run:
echo abc > a.txt
The file a.txt is in DOS format, not in UNIX.
What's wrong then?
I'd recommend reading and following the problem reporting guidelines found
at the link below for all problem reports. It keeps folks on this list that
could help from having to guess about your configuration.
Problem reports: http://cygwin.com/problems.html
Currently, my WAG is that you have 'c:\cygwin\bin' mounted as text.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/