shell or c-shell?

Tom Reingold tr at samadams.princeton.edu
Sat Mar 24 06:28:47 AEST 1990


In article <20009 at cs.yale.edu> chen-dahe at CS.Yale.EDU (Dahe Chen) writes:
$ I am having trouble with a shell script I wrote (forgive me if it is trivial,
$ what can you blame for a naive user):
$ 
$ #! /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 invode 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.

Is "." in the beginning of your path or at the end?  Did you rehash
after creating your man command?  Did you "chmod +x man"?  Try "./man
xxx" and see what happens.
--
Tom Reingold
tr at samadams.princeton.edu



More information about the Comp.unix.questions mailing list