Results 1 to 2 of 2
I have an alias both in my .bashrc and my .bash_profile -
alias autodock4='/home/fugate/disk2/AutoDock/autodock4/bin/autodock4'
The alias works fine if called on the command line, but when I run a bash ...
- 02-13-2010 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 10
bashrc, bash_profile alias issues
I have an alias both in my .bashrc and my .bash_profile -
alias autodock4='/home/fugate/disk2/AutoDock/autodock4/bin/autodock4'
The alias works fine if called on the command line, but when I run a bash script that calls the alias, the script dies and says autodock4 command not found.
I tried exporting the path -
DOCKPATH=$DOCKPATH:/home/fugate/disk2/AutoDock/autodock4/bin/autodock4
export DOCKPATH
Didn't help.
How can I get my script to read the alias from my .bashrc?
- 02-13-2010 #2
Since a script is executed by a non interactive bash
shell, it does not read either .bash_profile or .bashrc.
Set the variables, paths or aliases you want within the script.


Reply With Quote