delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/23/10:54:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <4FF77D01E13B214590F4FA3E2C3021D0873ABB@pecos.csw.alewife.net>
From: Jared Ingersoll <jared AT cswv DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: bash- Removing Line feeds (Carriage returns) from data
Date: Thu, 23 Oct 2003 10:54:26 -0400
MIME-Version: 1.0
X-OriginalArrivalTime: 23 Oct 2003 14:54:27.0994 (UTC) FILETIME=[8EA57FA0:01C39975]

Neither dos2unix nor unix2dos worked. Thanks for the info, those will come
in handy some day I'm sure.

jared

-----Original Message-----
From: DePriest, Jason R. [mailto:jrdepriest AT ftb DOT com]
Sent: Thursday, October 23, 2003 10:45 AM
To: cygwin AT cygwin DOT com
Subject: RE: bash- Removing Line feeds (Carriage returns) from data


> -----Original Message-----
> From: cygwin-owner AT cygwin DOT com 
> [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Jared Ingersoll
> Sent: Thursday, October 23, 2003 9:33 AM
> To: 'cygwin AT cygwin DOT com'
> Subject: bash- Removing Line feeds (Carriage returns) from data
> 
> 
> 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/da
> te +%Y%m%d`
> 
> I was unable to find any reference to an automated resolution 
> on google or
> cygwin FAQ.
> 
> Thanks for the help.
> 
> Jared

See if 'dos2unix' from the 'cygutils' package does what you need.

-Jason

--
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/

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019