So I have tried experimented and created an alias
in .bashrc
. However, when I test out the command I get:
[rkahil@netmon3 ~]$ menu
-bash: menu: command not found
Here is what I have in the .bashrc
file:
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
alias menu='./menuScript.sh'
alias vi='vim'
The funny thing is when I created the alias vi
, it worked. But menu does not. I have looked up previous posts on UnixStackExchange and attempted to follow other posts, but to no avail. Does anyone else have any suggestions?
./menuScript.sh: command not found
No such file or directory
, which is still not the same as the OP's error. The point still stands though - it would be best with an absolute path unless the alias is always only going to be used from the directory wheremenuScript.sh
resides.