I want to run some alias command in bash’s non-interactive mode. But seems Ubuntu ignore BAHS_ENV. How can I make it work? la is a alias command. And I tested in other linux. it is work fine. Just Ubuntu not work.
BASH_ENV=~/.profile bash -O expand_aliases -c la
I just logged in an Ubuntu box (12.04.1), and it works fine:
Create a file
test_bash_envthat contains the following script:Then, we happily have:
Did you mispell a variable or something?