bash: command not found
When trying to run an executable script from a folder within my Home directory and I get the following:
bash: unravel: command not found If I run the same command from $home/bin it works fine. How can I get executable scripts to run from any folder within $home and not just from /bin ?? -- btw, I'm obviously a rank newbie. much thanks. |
change your $PATH to include $home/bin with env, setenv, I don't remember exactly how.
|
howto add to path
suppose you have a directory ~/scripts
to add it to your path you type export PATH="$PATH:~/scripts" |
Or just precede it with a ./, as in
./unravel (That's assuming that unravel is in your current working dir). The next alternative is to: export PATH=$PATH:. Doing that for the root-user would be a bad idea, btw... Cheers, Tink |
Basically I have a handful of scripts that I want run from various folders (which are different projects) that are stored in my home directory. For example, I'd like to run a script called "unravel" from Folder1.
So to really show my newbie-ness....is the path edited in the bash_profile or from a .cshrc ? currently the bash_profile reads: PATH=$PATH:$HOME/bin export PATH=$PATH unset USERNAME Not sure if this is where you all are referencing? |
you should be able to add it there in .bash_profile
try changing PATH=$PATH:$HOME/bin to PATH=$PATH:$HOME/bin:$HOME/folder1:$HOME/folder2 etc. .cshrc is the config file for csh or tcsh which are different shells to bash. |
All times are GMT -5. The time now is 11:35 PM. |