Using Aliases in Bash Scripts

By default, aliases do not work in non-interactive shells, as stated by the Bash man pages:

“Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt”

To expand the aliases set the expand_aliases shell option:

shopt -s expand_aliases