Solved

Windows Command-Line: Find and Replace Character

Posted on 2014-01-29
1
474 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

708 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

13 Experts available now in Live!

Get 1:1 Help Now