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?
Asked
Active
Viewed 100 times
0
-
2Aliases are not expanded in scripts (non-interactive shells). – Kusalananda Oct 06 '21 at 07:25
-
2Does this answer your question? Why doesn't my Bash script recognize aliases? – Kusalananda Oct 06 '21 at 07:30