This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: bash- Removing Line feeds (Carriage returns) from data

> -----Original Message-----
> From: 
> [] On Behalf Of Jared Ingersoll
> Sent: Thursday, October 23, 2003 9:33 AM
> To: ''
> 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.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]