Alias not working in Bashrc that is a shell script

countryboy

New Member
Joined
Aug 7, 2019
Messages
7
Reaction score
0
Credits
60
Hi All,

I've searched Google, and though I'm searching as to why my alias is not working in the bashrc, I'm getting results of alias not working in shell scripts.

I have a script that is called digCUST.sh, and I added an alias in my .bashrc file:
alias digh="digCUST.sh"

I sourced the bashrc file, but when I attempt "digh" I get the error: -bash: digh: command not found

I never had an issue with alias in the bashrc before, but this is the first time I've attempted to use an alias for a shell script. Is there something I am overlooking?
 


Just a guess, but usually you have to either add the full path, or put the script file some where in your path.

alias digh="/path/to/digCUST.sh"

or

mv digCUST.sh /usr/bin

also remember to make the script executable.

chmod 755 digCUST.sh
 

Members online


Top