我在 bash 脚本中发现了这种奇怪的行为。
#!/bin/bash V=a alias $V="echo test" echo $(a) #returns 'test' echo $($V) #returns ...'a: not found'
有没有办法用变量模拟以前的行为?
bash alias shell-script
alias ×1
bash ×1
shell-script ×1