shell or c-shell?

Dahe Chen chen-dahe at CS.YALE.EDU
Sat Mar 24 07:22:57 AEST 1990


In article <20009 at cs.yale.edu> I write:
>I am having trouble with a shell script I wrote (forgive me ...)
>
>#! /bin/sh
>#
>MANPATH=/twolf7/dchen/man
>if [ -f $MANPATH/"$1".1 ]
>then
>    nroff -man $MANPATH/"$1".1 | more
>else
>    /usr/ucb/man $1
>fi
>
>It works if I explicitly invoke shell, i.e.,
>
>% sh [-x] man xxx
>
>but does not work when I do
>
>% man xxx
>
>which gives me
>
>No manual entry for .
>
>My login shell is csh. It looks like the latter calls c-shell instead of shell.
>If it is true, how can I solve the problem. Thanks in advance.

I forgot to say that I am using ULTRIX-32 version 3.0 and that any
other names for the shell script work in the c-shell. I am now puzzled
why the kernal can not determine correctly which shell to use if I use
that very name. Everything looks fine to me:

% ls -l ~/bin/man
-rwxr-xr-x  1 dchen         149 Mar 23 16:16 /twolf7/dchen/bin/man*
% which man
/twolf7/dchen/bin/man
% file ~/bin/man
/twolf7/dchen/bin/man:  /bin/sh script
% echo $PATH
.:/twolf7/dchen/bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin:/etc:/usr/etc:/usr/new/mh


Can anyone enlighten me? Thanx.



----------------------
Dahe Chen
internet:   dchen at twolf.ce.yale.edu
	    chen-dahe at cs.yale.edu
bitnet:	    dchen at yalevms



More information about the Comp.unix.questions mailing list