[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [rhelv5-list] how to handle "echo" ?



On 7/5/07, Tom Sightler <ttsig tuxyturvy com> wrote:
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.

This is strange behavior, although it isn't clear to me that it
"should" call /bin/echo. The man page I'm looking at on RHEL5 doesn't
seem to say that. It says the behavior in this case is "system
dependent."

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.

While that might get it to call an external program wouldn't you still
need to add "-e" to get the desired behavior? And if so, then why not
add the "-e" to the built-in echo anyway?

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]