I am literally new to the scripting language.
I have to run source ~/.custom_rc command from within a shell script. When I run the shell script, It doesn't show any error. It run just fine.
Here is my install.sh file.
#!/usr/bin/env bash
#
# Some Comments
#
# End of Comments
echo ""
.
.
.
.
.
.
source ~/.custom_rc
echo "End Of Script..."
I am executing the script from curl using sh -c like,
sh -c "$(curl -fsSL https://some.link/to/install.sh)"
Why the command isn't running inside the script? How am I supposed to make them run inside shell scripting?
EDIT #1:
I am using alias commands inside the .custom_rc file.
Once the execution completed, I am unable to use the alias commands.
But, when I manually run source ~/.custom_rc, alias commands works fine.
.custom_rc? It is in your home directory, I would assume, right?.custom_rcfile. Once the execution completed, I am unable to use the alias commands. But, when I manually runsource ~/.custom_rc, alias commands works fine.bashscript but you're running it withsh. That's potentially a problem.