0

I'm trying to write a script that recursively calls to a command that I defined in my .bashrc using alias name-of-function ='path-to-find-it' but each time I get the error command not found. If i copy paste each line from the script into the terminal it works, but by simply going bash SHELL.sh (or sh SHELL.sh) it doesn't work... I guess it's not reading from the .bashrc maybe? is there a way to make sure it reads from that?

Mrcs
  • 1
  • 2
    Aliases are not expanded in scripts (non-interactive shells). – Kusalananda Oct 06 '21 at 07:25
  • 2
    Does this answer your question? [Why doesn't my Bash script recognize aliases?](https://unix.stackexchange.com/questions/1496/why-doesnt-my-bash-script-recognize-aliases) – Kusalananda Oct 06 '21 at 07:30

0 Answers0