Sponsored Content
Full Discussion: Cd
Top Forums UNIX for Dummies Questions & Answers Cd Post 8018 by rwb1959 on Thursday 4th of October 2001 04:10:04 PM
Old 10-04-2001
The AIX version seems to explain it best. It states that this
is to provide exec()-able versions of shell built-ins...
Code:
#!/usr/bin/psh
# @(#)36        1.2  src/bos/usr/bin/ksh/exec-builtin.sh, cmdksh, bos430, 9737A_
430 6/1/95 00:09:57
#
# COMPONENT_NAME: (CMDKSH) Korn Shell
#
# FUNCTIONS:
#
# ORIGINS: 27
#
#
# This shell script gets installed in /usr/bin to provide an exec()-able
# version of certain shell builtins:
#       alias           command         getopts         umask
#       bg              fc              jobs            unalias
#       cd              fg              read            wait
#       hash            type
#
# These are also builtins, but already have historical version in /usr/bin:
#       false           kill            newgrp          true
#
command=`/usr/bin/basename $0`          # Invoke the ksh builtin
if [ "$command" = "type" ]
then
        whence -v "$@"
elif [ "$command" = "hash" ]
then
        alias -t - "$@"
else
        $command "$@"
fi

...interestingly though it seems to execute in the Perl Shell
#!/usr/bin/psh but I haven't verified this.

added code tags for readability --oombera

Last edited by oombera; 02-20-2004 at 11:06 AM..
 
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh. Note that /etc/shells overrides the default list. Invalid shells in /etc/shells may cause unexpected behavior (such as being unable to log in by way of ftp(1)). FILES
/etc/shells lists shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.10 4 Jun 2001 shells(4)
All times are GMT -4. The time now is 12:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy