Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!yale!cs.yale.edu!chen-dahe From: chen-dahe@CS.YALE.EDU (Dahe Chen) Newsgroups: comp.unix.questions Subject: Re: shell or c-shell? Message-ID: <20050@cs.yale.edu> Date: 23 Mar 90 21:22:57 GMT References: <20009@cs.yale.edu> Sender: news@cs.yale.edu Reply-To: chen-dahe@CS.YALE.EDU (Dahe Chen) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 52 In article <20009@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@twolf.ce.yale.edu chen-dahe@cs.yale.edu bitnet: dchen@yalevms