我已經在根目錄中創建一堆別名在.bash_profile中上,但那些不working.can任何人能幫助我在做什麼錯 # .bash_profile
#shopt -s expand_aliases
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific
我使用Mac和我有: $cat .bashrc|grep la
alias la='ls -la'
然後我試圖使用它在腳本: $cat ./mytest.sh
#!/bin/bash
la
它運行,並說這是不可能找到啦: ./mytest.sh: line 2: la: command not found
這是爲什麼?我嘗試了Mac和Linux,同樣的錯誤!