× 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.



Wait a minute. Did Scott just use "mine" and "ugly" in the same
sentence? :)

Tom Armbruster

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, March 19, 2010 11:22 AM
To: RPG programming on the IBM i / System i
Subject: Re: Replace 1 Char with 3Char's

Hi Dennis (and Joe),

But I'm not sure why the \r\n is not being converted to CRLF. Pretty
sure
that will work on a unix system. Hmmm... a challenge, since I see
that
doesn't work in either QSH or PASE.

I was actually surprised that you had used \r\n in one of your previous
posts... because I had always thought that wouldn't work. So I figured

you knew something I didn't...

Hmmm... If I were on a unix terminal or writing a unix script, I'd
just include a CTRL+M between the quotes, but that won't work here.

True. But, you could use backticks or $() to print the actual
characters. Unfortunately, that'll mean using weak quotes, so you'll
have to double-up the backslashes... really makes it ugly.

But it should work:

sed "s:\\\\\.br\\\\:$(print '\\\r\\\n'):g" in.hl7 > out.hl7

(I also replaced the % with : -- IMHO, % is ugly)

If someone doesn't provide you a better solution, I will post a CL
program
(as an example) that can do this.

I was hoping you'd come up with a solution, since mine (above) is so
ugly. :)

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.