×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Indeed, I'd like to see single line versions.
Here is the single line version in .NET:
File.WriteAllText(@"C:\temp\testWithoutCRLF.txt", File.ReadAllText(@"C:\temp\test.txt").Replace(ControlChars.CRLF,""));
All the cool stuff is on the Unix side of the i in PASE.
Matt
-----Original Message-----
From: John Yeung [mailto:gallium.arsenide@xxxxxxxxx]
Sent: Wednesday, August 14, 2013 5:23 PM
To: Midrange Systems Technical Discussion
Subject: Re: Replacing carriage returns in a data file
On Wed, Aug 14, 2013 at 6:05 PM, Matt Olson <Matt.Olson@xxxxxxxx> wrote:
The .NET version is much simpler [than CL]:
Once you know .NET you don't go back!
Well, CL is a particularly clunky string-processing language. A number of methods are equally simple or simpler than .NET. Unix command-line tools (like sed, mentioned by Luis) and Perl can do search-and-replace (including regex!) in a single line.
That is what I *thought* Luis was getting at when he mentioned using sed through QSH.
John
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.