Collins, Kevin [MindWorks] wrote:
Hi,

        in moving from RHEL3 to RHEL5, there is a change from pdksh to
AT&T ksh93. We have hundreds of scripts that are primarily written for
HP-UX but are also run on Linux.
The problem is that pdksh and HP's ksh both support expanding
backslashed escapes (such as "\c") with their builtin "echo" command as
default behavior. While the ksh93 echo is apparently a builtin, it
appears to use the standalone /bin/echo. The man page clarifies that
echo is a builtin, but if backslash-escapes are present, the external
echo command is called. The rub is that the external echo command
requires a "-e" be passed to get that behavior.

I cannot modify all the scripts in question to use the ksh builtin
"print" rather than echo so I am looking for some other option(s). So
far, I've thought I could:

1) rename /bin/echo to /bin/echo-orig and create /bin/echo as a script
that calls "/bin/echo-orig -e". The problem with that is I don't know
what other shell(s) that may break.

2) making a copy of zsh as ksh and use the compatibility features. A
quick test shows that zsh-as-ksh works with the backslashed escapes. In
this case, I have almost no experience with zsh, and none with ksh
compatibility mode.

3) grabbing the psksh SRPM from RedHat and trying to build that as a
replacement for ksh93.

I can't use an alias or function because many of the scripts are called
by cron and/or executed via rsh...

I would probably
1. Raise a support ticket
and
2. Get the latest EL src.rpm for pdksh and build that, and keep an eye out for updates.

Red Hat won't fix it unless it knows it's a problem. Once it knows about the problem, it might choose to add pdksh to EL5 as an alternative ksh and add it to the support base.

You might also participate in future beta programs. One of their purposes is to pick up problems like this.




--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]

Please do not reply off-list

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to