LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: setenv: command not found (https://www.linuxquestions.org/questions/linux-newbie-8/bash-setenv-command-not-found-485458/)

anobansa 09-20-2006 06:51 PM

bash: setenv: command not found
 
i can not run setenv or path commands. I tried to search earlier post, they did not seem to work.

Plz suggest.

stress_junkie 09-20-2006 07:52 PM

setenv is a shell built in function for the c shell and the tc shell. bash DOES have the printenv command as a shell built in function.
Code:

root> sentenv
-bash: sentenv: command not found
root> /usr/bin/tcsh
...
root# setenv
LESSKEY=/etc/lesskey.bin
NNTPSERVER=fart
INFODIR=/usr/local/info:/usr/share/info:/usr/info
MANPATH=/usr/share/man:/usr/local/man:/usr/X11R6/man:/opt/gnome/share/man
...
_=/usr/bin/tcsh
VENDOR=suse
GROUP=root


goggyturk 09-26-2006 05:57 AM

Could be your /sbin directory isn't in your PATH - which dictates which directories your system looks in for programs to execute from the CLI.

Try

/sbin/setenv [yourstuff] ...

See if that works

jlliagre 09-26-2006 07:11 AM

Quote:

Originally Posted by goggyturk
Could be your /sbin directory isn't in your PATH - which dictates which directories your system looks in for programs to execute from the CLI.

Try

/sbin/setenv [yourstuff] ...

See if that works

It won't work. /sbin/setenv doesn't exist.

As stress_junkie already pointed, setenv is a csh builtin command, which means it is processed internally by this shell.

Use the export builtin with bourne shells.

goggyturk 09-29-2006 02:16 AM

:twocents: Sorry 'bout that... I'll be more careful in future


All times are GMT -5. The time now is 08:29 PM.