Subject: Re: ksh need help!!!
To: Matthias Buelow <mkb@mukappabeta.de>
From: Michael Kukat <michael@unixiron.org>
List: netbsd-users
Date: 12/18/2001 18:16:22
Hi !

On Tue, 18 Dec 2001, Matthias Buelow wrote:
> You're right of course in this special case, since we're speaking about
> pdksh on NetBSD, which doesn't seem to attempt to emulate the system's
> version of echo(1).  Here's what I get with the real ksh (1993-12-28 k+)
> on a FreeBSD system, where ksh's echo seems to use the BSD style of things:
>
> $ echo '\0100\c'
> \0100\c
> $ print '\0100\c'
> @$

This is a bit strange, as i used the echo of the IRIX ksh, and this is the
same effect of all the other commercial OSes ksh versions, which i just think
is the real AT&T ksh. pdksh behaves different in many things (i just say
pipes, read and subshells in this case :), but the real ksh _IS_ the real
ksh. So you might want to check, if you really have the real ksh running in
your FreeBSD environment.

Otherwise... maybe there are options to change the behaviour of echo.

> >ksh. And my tests also were in ksh. If one sais "ksh", the OS and style of
> >executable doesn't matter, as long as you use the builtins.
>
> No, the builtins often cannot be relied up either, unless it's a builtin
> such as "print", which is not available as an external command and as
> such needs not retain any backwards compatibility.
> A shell at compilation often configures itself to use the system's style
> of doing things (so that it doesn't break scripts, isn't Unix a mess...)

I never saw the case of a shell using the external things first, ignoring the
builtins. If you want to use the external program, you just give the path
with it, what should you do to explicitly use the builtin version? All the
shells i know first use the builtins before using external stuff with the same
names...

...Michael

-- 
visit http://www.bsdfans.org/   Home network powered by: NetBSD OpenBSD FreeBSD
Solaris HP-UX IRIX AIX MUNIX Tru64 Ultrix VMS SINIX Dolphin_Unix OpenStep MacOS