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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Thu, 23 Oct 2003 12:28:55 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Jared Ingersoll cc: cygwin AT cygwin DOT com Subject: Re: bash- Removing Line feeds (Carriage returns) from data In-Reply-To: <4FF77D01E13B214590F4FA3E2C3021D0873AB9@pecos.csw.alewife.net> Message-ID: References: <4FF77D01E13B214590F4FA3E2C3021D0873AB9 AT pecos DOT csw DOT alewife DOT net> Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 23 Oct 2003, Jared Ingersoll wrote: > Hello, > > I'm currently using cygwin (updated yesterday) with a WIN2K resource kit > utility to dump logs from event viewer into a comma delimited file. One > behavior that I have noticed (and occasionally notice with cygwin in > general) is that within the data, there are what I believe to be carriage > returns (show up in an excel spreadsheet as a square character). This data > will eventually end up in an Oracle database, so these characters are > undesirable. I was wondering if there is a way (outside of manually editing > the file, perhaps with sed or awk) to remove these characters? > > Here's the command that's producing them in the bash shell: > > /cygdrive/d/EventAudit/dumpel.exe -d 1 -s MyPC -l system -t -c | > /cygdrive/c/cygwin/bin/awk '{print "MyPC" "," "system" "," $0}' >> > /cygdrive/d/EventAudit/serverevents.`/cygdrive/c/cygwin/bin/date +%Y%m%d` > > I was unable to find any reference to an automated resolution on google or > cygwin FAQ. > > Thanks for the help. > Jared You might want to look into the "nobinmode" setting in the CYGWIN environment variable. See . Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/