Re: Posix command locations



"gns" <gnskumar@xxxxxxxxx> writes:

#!/bin/ksh -p
#
cmd=`basename $0`
$cmd "$@"

It is not evident to me as to how the actual command is getting called via
this shell script.

It's a shell builtin.

-p is Korn shell is to turn on the privileged mode to run setuid programs. I
could not find the suid profile for ksh under /etc.

It is used to make sure $ENV is ignored also; that is the more important
purpose in this case.

I replaced the -p option with -x in the /usr/bin/cd script, but there was no
change in behaviour of the "cd" command, "cd" just worked as before.

Quite; these commands are never used by the shell; they appear to
exist so that ``execlp("cd", ....)'' works.

Can someone letme know how exactly this works and where exactly the binaries
are located.

/bin/ksh would be the binary

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
.