考虑以下
shell代码:
unset foo echo "${foo-'}'}"
结果取决于使用的shell:
> bash:’}’
> ksh:”}
> tcsh:失踪}.
> zsh:”}
根据POSIX标准,哪些shell表现出来?
解决方法
符合POSIX的shell应该输出:
''}