In ~/.bashrc, I defined some aliases. But I cannot use them in other shell scripts, where I can only use aliases defined right there. Even though I sourced bashrc, it still
You need to do shopt -s expand_aliases in the script in addition to sourcing ~/.bashrc.
shopt -s expand_aliases
~/.bashrc