Solved

Windows Command-Line: Find and Replace Character

Posted on 2014-01-29
1
475 Views
Last Modified: 2014-01-29
Hi,

I have large pipe-delimited text files with line-feed (LF) terminators (from Linux platforms).
I want to replace this character to regular line terminator such as '\n', because Oracle doesn't take this terminator when I try to import these text files.
Is there any command to find & replace this character in DOS window? and is there any way to identify the last character of the line (terminator) so that I can just replace that?
I can't use regular notepad or any text editor to do this, because i have many files with the same problem that I need to fix quickly.

Any help would be greatly appreciated.

Thank you.
0
Comment
Question by:iamnamja
1 Comment
 
LVL 12

Accepted Solution

by:
ktaczala earned 500 total points
ID: 39818780
search for a hex editor utility.
here's one link
http://mh-nexus.de/en/hxd/

you should be able to search & Replace 0x0a (LF) with 0x0D (CR)
hopefully your data lines do not have any 0x0a characters in it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now