预计阅读本页时间:-
POSIX Mode
Besides its native operating mode, bash can also be switched into POSIX mode. The POSIX (Portable Operating System Interface) standard, described in detail in Appendix A, defines guidelines for standardizing UNIX. One part of the POSIX standard covers shells.
bash is nearly 100% POSIX-compliant in its native mode. If you want strict POSIX adherence, you can either start bash with the —posix option, or set it from within the shell with set -o posix.
广告:个人专属 VPN,独立 IP,无限流量,多机房切换,还可以屏蔽广告和恶意软件,每月最低仅 5 美元
Only in very rare circumstances would you ever have to use POSIX mode. The differences, outlined in Appendix A, are small and are mostly concerned with the command lookup order and how functions are handled. Most bash users should be able to get through life without ever having to use this option.