How to make cygwin redirect in UNIX mode?
Pan ruochen
panruochen@gmail.com
Mon Jun 8 09:40:00 GMT 2009
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?
--
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/
More information about the Cygwin
mailing list