On Thu, 2007-07-05 at 15:43 -0700, 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. > Hi Kevin,
Yes, we've also hit this issue on our RHEL5 test environments with many of our ksh scripts, not as many as you have to deal with, but still more than we were interested in changing. We actually ran an strace on the ksh process and found that it seems that it doesn't really call /bin/echo as it should. It appears that ksh looks for the echo command in a portion of the PATH but actually ignores /bin for some reason and thus fails to find /bin/echo so it falls back to using it's builtin function. We found that simply placing a symbolic link to /bin/echo in /usr/local/bin seemed to correct the behavior. I know this seems weird, but try it. We think this is a bug but haven't had enough time to truly research exactly what's happening and file it. Actually, we'd love to know if this strange workaround actually fixes it for you as well. Later, Tom _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
