×
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.
This is the command I am running:
qsh cmd('sed "s%[\.br\]%\r\n%g" /joe/temp/in.hl7 > /joe/temp/out.hl7')
in.hl7 contains this -
\.br\hello\.br\joe
after running the command, out.hl7 contains this -
rnrnrnrnrnhellornrnrnrnrnjoe
Yes. You are telling sed to replace any backslash, any period, any b, or
any r with the sequence of \r\n. It's doing that because you've defined a
class to be replaced, and the class contains all those characters. ->
[\.br\] <- This is not what you want. You want a command more like this:
sed s%[\][.]br[\]%\r\n% (or the more obvious but less readable
s%\\\.br\\%\r\n%)
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. 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.
If someone doesn't provide you a better solution, I will post a CL program
(as an example) that can do this.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"More than half (55 percent) of women undergraduates are female."
-- About Women on Campus, newsletter published by the National
Association for Women in Education
As an Amazon Associate we earn from qualifying purchases.