X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Mon, 8 Jun 2009 17:40:44 +0800 Message-ID: Subject: How to make cygwin redirect in UNIX mode? From: Pan ruochen To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/