On Mon, 8 Mar 1999, Ben Handley wrote:
> Hi,

        Hi!
 
> i recently tried to add /usr/local/bin to my PATH, but when i looked in
> /etc/csh.cshrc (is this the right file?), it seemed to be there already.

        My man page (csh) doesn't say anything about /etc/csh.cshrc.
There is ~/.cshrc and ~/.login.  So in case your shell isn't tcsh that
ain't the file to use.

> There was a line using setenv to set the PATH to
> /bin:/usr/bin:/usr/local/bin:/usr/X11/bin but it wasn't finding programs in
> /usr/local/bin. Programs run fine when i use env PATH="/usr/local/bin"
> [program name].
> So i tried running setenv, but it appears not to be anywhere on my
> computer. Neither are putenv, getenv, or environ, although the man pages are.
> Is it a bad thing not to have these, and if so where can i get them?
> (I'm running Red Hat 5.2 with kernel 2.2.1 on a K6200 if that's significant).

        If your shell is /bin/tcsh than setenv is an internal command.
Check all those commands in the tcsh man page.  So don't check for export.
If you use bash than you don't have to care about /etc/csh.cshrc or any of
the above mentioned commands.  This is a simple way to check what is your
shell that will give you the right answer no matter what shell are you
using:
$ cat /etc/passwd | grep name
of course, you will have to put your user name instead of the word name.
At the end of the line there will be the shell name.  Or to have the exact
name you could try this as well:
$ cat /etc/passwd | grep name | cut -d ":" -f 7
 
        Raider
--
                ``Liberate tu-temet ex inferis''

Reply via email to