You need to do shopt -s expand_aliases
in the script in addition to sourcing ~/.bashrc
.
More Related Contents:
- How do I run a shell script without using “sh” or “bash” commands?
- How to make .bashrc aliases available within a vim shell command? (:!…)
- Why aliases in a non-interactive Bash shell do not work
- In Bash, how to add “Are you sure [Y/n]” to any command or alias?
- Can’t get expand_aliases to take effect
- Why bash alias doesn’t work in scripts? [duplicate]
- Why would I create an alias which creates a function?
- Can I export a variable to the environment from a Bash script without sourcing it?
- Passing arguments to an interactive program non-interactively
- How to urlencode data for curl command?
- How to define hash tables in Bash?
- Assigning default values to shell variables with a single command in bash
- Why isn’t tilde (~) expanding inside double quotes? [duplicate]
- sed search and replace strings containing / [duplicate]
- bash: shortest way to get n-th column of output
- Calling shell functions with xargs
- Openssh Private Key to RSA Private Key
- Parse out key=value pairs into variables
- How to split a string in shell and get the last field
- What is
- How to write a bash script to set global environment variable?
- Hiding secret from command line parameter on Unix
- Bash Script Binary Search
- Escaping forward slashes in sed command [duplicate]
- Convert a string into an array with bash, honoring quotes for grouping [duplicate]
- Remove all files except some from a directory
- Use GNU find to show only the leaf directories
- Get the name of the caller script in bash script
- Creating tar file and naming by current date
- Can bash script be written inside a AWS Lambda function