Solved

Windows Command-Line: Find and Replace Character

Posted on 2014-01-29
1
488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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 …

734 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