Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Fri, 7 Feb 2003 10:55:09 +0530 From: Chiranth X-X-Sender: Chiranth DOT m AT nkpl-252 To: Harald Kierer cc: cygwin AT cygwin DOT com Subject: Re: awk strangely outputs to file In-Reply-To: <8C6D4989662C304087C58904BAB721A54B7368@Hermes.astrum.de> Message-ID: X-System: Cygwin on W2K MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Feb 3, Harald Kierer wrote.... >How can awk write Windows-like text files from within the script? >The only way right now is to redirect the whole output like above. > perhaps you would like to keep awk working the way it is currently and call use the program unix2dos to convert the output file to DOS format. You can write it in a single shell script somewhat like this... #!/bin/bash awk -v v_OutFile="c:/x" -f example.awk /etc/passwd dos2unix "c:/x" IMO it would be a pain if awk were to output data with Windows style line terminators. It would affect other programs to which data is piped from awk. -- Chiranth M.C. Netkraft Pvt Ltd http://symonds.net/~chiranth -- 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/