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



Upon closer read of the prior IBM link, I see that sed is not in that
gnu-utilities link. I've found sed for AIX but it's an RPM. It's also
part
of AIX Toolbox, but that's another RPM.<sigh>


I have a solution. I went to
http://bio.gsi.de/DOCS/AIX/aixpdslib.seas.ucla.edu/packages/sed.html where I
downloaded sed for AIX 4.3. (The 5.x link seems to be broken, but that's OK
for this purpose...)

Not being an administrator on this System i, I extracted the tarfile and
moved $HOME/usr/local/bin/sed to $HOME/bin. (This is /home/dlovelady/bin on
the system in question.)

Then, I ADDENVVAR ENVVAR(PATH) VALUE('/home/DLOVELADY/bin:/usr/bin')
REPLACE(*YES)

Now, when I do the following:
QSH CMD('echo "abc" | sed "s:a:a\r\n:")
the output is...
a
bc
Press ENTER to end terminal session.

If you put this sed into a path above your normal path (for example
/usr/local/bin) and if the stars align, you will be using gnu sed, which,
IMO, is a far superior solution to whatever IBM has used here.

Alternatively, you could install in some obscure directory, and use full
path when you want the GNU version. For example: QSH CMD('echo "abc" |
/home/dlovelady/bin/sed "s:a:a\r\n:")

Good luck!
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"A bore is a man who, when you ask him how he is, tells you."
-- Bert Leston Taylor




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.