×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




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

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2026 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.