{"id":134384,"date":"2019-02-15T11:00:06","date_gmt":"2019-02-15T03:00:06","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=134384"},"modified":"2019-01-22T09:05:29","modified_gmt":"2019-01-22T01:05:29","slug":"bash-5-release","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/bash-5-release.html","title":{"rendered":"Bash 5.0\u5373\u5c06\u53d1\u5e03\uff0c\u6216\u4e0e4.4\u90e8\u5206\u4e0d\u517c\u5bb9"},"content":{"rendered":"

Unix Bash \u653e\u51fa\u7b2c 5 \u4e2a\u4e3b\u8981\u7248\u672c\uff0c\u8fd9\u4e2a\u7248\u672c\u4e3b\u8981\u4fee\u590d\u4e86Bash 4.4 \u4e2d\u51e0\u4e2a\u660e\u663e\u7684\u9519\u8bef\uff0c\u540c\u65f6\u4e5f\u52a0\u5165\u4e86\u4e00\u4e9b\u65b0\u529f\u80fd\u3002Bash \u662f\u4e00\u4e2a\u5b8c\u6574\u7684POSIX \u89c4\u8303\u9879\u76ee\uff0c\u9664\u4e86\u6709\u4ea4\u4e92\u5f0f\u547d\u4ee4\u5217\u7f16\u8f91\u529f\u80fd\uff0c\u8fd8\u5728\u57fa\u67b6\u6784\u4e0a\u652f\u63f4\u5de5\u4f5c\u63a7\u5236\uff0c\u5e76\u63d0\u4f9b\u7c7b\u4f3ccsh\u7684\u529f\u80fd\u7b49\u3002<\/p>\n

Bash 5.0 \u4e3b\u8981\u89e3\u6c7a Bash 4.4\u7684\u9519\u8bef\uff0c\u6539\u53d8\u5bf9nameref\u89e3\u6790\u7684\u65b9\u6cd5\uff0c\u548c\u4e00\u7cfb\u5217\u4ee5\u6a21\u7cca\u6d4b\u8bd5\u53d1\u73b0\u7684\u6f5c\u5728\u67e5\u51fa\u8303\u56f4\u7684\u9519\u8bef\u3002\u53e6\u5916\uff0cBash 5.0 \u5728\u4e0d\u6267\u884c\u5b57\u7b26\u62c6\u89e3\u4ee5\u7b26\u5408Posix\u6807\u51c6\u89e3\u91ca\u7684\u60c5\u6cc1\u4e0b\uff0c\u5728\u4e0d\u540c\u7684\u4e0a\u4e0b\u6587\u4e2d\uff0c$@\u548c$*\u7684\u64f4\u5145\u4e5f\u6709\u8a31\u591a\u6539\u8b8a\uff0c\u800c\u4e14\u9084\u89e3\u6c7a\u4e0d\u5c11\u6975\u7aef\u6848\u4f8b\u4ee5\u589e\u52a0Posix\u7684\u4e00\u81f4\u6027\u3002<\/p>\n

\"\"<\/p>\n

\u800c\u672c\u6b21\u6700\u91cd\u8981\u7684\u529f\u80fd\u66f4\u65b0\uff0c\u662f\u589e\u52a0\u4e86\u65b0\u7684\u73af\u5883\u53d8\u91cf\uff0cBASH_ARGV0\u3001EPOCHSECONDS\u548cEPOCHREALTIME\u3002\u800c\u5185\u5efa\u7684 History \u529f\u80fd\u73b0\u5728\u53ef\u4ee5\u7528\u6765\u522a\u9664\u5386\u53f2\u6570\u636e\u7684\u8303\u56f4\uff0c\u5e76\u4e14\u5c06\u8d1f\u7684\u53c2\u6570\u4f5c\u4e3a\u5386\u53f2\u5217\u8868\u672b\u7aef\u7684\u504f\u79fb\u91cf\u3002Bash 5.0\u8fd8\u589e\u52a0\u4e86\u4e00\u4e2a\u9009\u9879\uff0c\u5141\u8bb8\u533a\u57df\u53d8\u91cf\u96c6\u6210\u524d\u4e00\u4e2a\u4f5c\u7528\u57df\u4e2d\uff0c\u5177\u6709\u76f8\u540c\u540d\u79f0\u7684\u53d8\u91cf\u540d\u3002<\/p>\n

\u53e6\u5916\uff0c\u8fd8\u52a0\u5165\u4e00\u4e2a\u65b0\u7684\u9009\u9879\uff0c\u542f\u7528\u540e\u5c06\u5141\u8bb8 shell \u53ea\u5c1d\u8bd5 \u6269\u5c55\u5f00\u59cb\u4e0b\u6807\uff08Subscripts\uff09\u4e00\u6b21\uff0c\u4f46\u5b98\u65b9\u8868\u793a\uff0c\u8fd9\u4e2a\u529f\u80fd\u5728\u6570\u5b66\u8868\u8fbe\u5f0f\u4e2d\u4ecd\u4f1a\u51fa\u73b0\u4f7f\u7528\u95ee\u9898\u3002Bash 5.0\u73b0\u5728\u4f1a\u9884\u8bbe\u542f\u7528globasciiranges \u9009\u9879\uff0c\u4f7f\u7528\u8005\u53ef\u4ee5\u5728\u914d\u7f6e\u9636\u6bb5\u5c07\u5176\u8bbe\u5b9a\u4e3a\u9884\u8bbe\u5173\u95ed\u3002<\/p>\n

\u5b98\u65b9\u63d0\u9192\uff0cBash 4.4\u548cBash 5.0\u4e4b\u9593\u5b58\u5728\u90e8\u5206\u4e0d\u517c\u5bb9\u7684\u66f4\u65b0\uff0c\u50cf\u662f nameref \u89e3\u6790\u65b9\u6cd5\u7684\u66f4\u65b0\uff0c\u4ee3\u8868\u7740\u4f7f\u7528 namerefs \u4f1a\u51fa\u73b0\u4e0d\u540c\u7684\u884c\u4e3a\uff0c\u5c3d\u7ba1\u5b98\u65b9\u63d0\u5230\u4ed6\u4eec\u5df2\u7ecf\u5c3d\u53ef\u80fd\u51cf\u5c11\u8fd9\u79cd\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u4f46\u4ecd\u6709\u90e8\u5206\u65e0\u6cd5\u907f\u514d\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u73b0\u5728\u5728\u9884\u8bbe\u60c5\u51b5\u4e0b\uff0c\u5f53\u542f\u7528\u6269\u5145\u6a21\u5f0f\u7684\u65f6\u5019\uff0c shell \u624d\u4f1a\u542f\u52a8\u914d\u7f6eBASH_ARGC\u548cBASH_ARGV\uff0c\u5b98\u65b9\u8868\u793a\uff0c\u8fd9\u662f\u4e00\u4e2a\u4e4b\u524d\u7684\u8bbe\u7f6e\u5b9a\u758f\u5ffd\uff0c\u5728\u4f20\u9012\u5927\u91cf\u53c2\u6570\u65f6\uff0c\u4f1a\u9020\u6210\u6548\u7387\u4f4e\u4e0b\u7684\u95ee\u9898\u3002<\/p>\n

\u5b98\u65b9\u5efa\u8bae\u4f7f\u7528\u8005\u53ef\u4ee5\u5c06 Bash \u8fde\u63a5\u5230\u5df2\u5b89\u88dd\u7684 Readline \u5e93\uff0c\u800c\u975e\u4f7f\u7528 lib\/readline \u4e2d\u7684\u7248\u672c\uff0c\u56e0\u4e3a\u53ea\u6709 Readline 8.0 \u4ee5\u53ca\u4ee5\u4e0a\u7248\u672c\uff0c\u624d\u80fd\u63d0\u4f9b\u6240\u6709Bash 5.0\u9700\u8981\u7684\u5b57\u7b26\uff0c\u4f7f\u7528\u65e9\u524d\u7684 Readline \u5e93\u7248\u672c\u5c06\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Unix Bash \u653e\u51fa\u7b2c 5 \u4e2a\u4e3b\u8981\u7248\u672c\uff0c\u8fd9\u4e2a\u7248\u672c\u4e3b\u8981\u4fee\u590d\u4e86Bash 4.4 \u4e2d\u51e0\u4e2a\u660e\u663e\u7684\u9519\u8bef\uff0c\u540c\u65f6\u4e5f\u52a0\u5165\u4e86 […]<\/p>\n","protected":false},"author":317,"featured_media":33877,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-134384","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/134384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/317"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=134384"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/134384\/revisions"}],"predecessor-version":[{"id":134549,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/134384\/revisions\/134549"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/33877"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=134384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=134384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=134384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}