{"id":3276,"date":"2019-06-19T23:47:32","date_gmt":"2019-06-19T15:47:32","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3276"},"modified":"2019-06-19T23:47:33","modified_gmt":"2019-06-19T15:47:33","slug":"shopt","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/shopt","title":{"rendered":"shopt\u547d\u4ee4 – \u8bbe\u7f6e\u63a7\u5236shell\u884c\u4e3a\u53d8\u91cf\u7684\u5f00\u5173"},"content":{"rendered":"\n

shopt\u547d\u4ee4\u53ef\u4ee5\u8bbe\u7f6e\u54ea\u4e9b\u63a7\u5236\u7740Shell\u884c\u4e3a\u7279\u6027\u7684\u53d8\u91cf\u7684\u5f00\u5173\u503c\uff0c\u4ee5\u8fbe\u5230\u63a7\u5236Shell\u884c\u4e3a\u7684\u76ee\u7684\u3002\u5f53\u6267\u884c\u547d\u4ee4shopt\u4e0d\u5e26\u4efb\u4f55\u53c2\u6570\u65f6\uff0c\u5c06\u5217\u51fa\u7531shopt\u63a7\u5236\u7684\u90a3\u4e9b\u7279\u6027\u53ca\u5176\u72b6\u6001\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>shopt [\u53c2\u6570] <\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-s<\/td>\u4e0d\u5e26\u9009\u9879\u65f6\uff0c\u663e\u793a\u6240\u6709\u6253\u5f00\u7684\u9009\u9879\u3002\u5982\u679c\u540e\u8fb9\u8ddf\u4e0a\u76f8\u5e94\u7684\u9009\u9879\uff0c\u5219\u6253\u5f00\u6b64\u9009\u9879<\/td><\/tr>
-u<\/td>\u4e0d\u5e26\u9009\u9879\u65f6\uff0c\u663e\u793a\u6240\u6709\u672a\u6253\u5f00\u7684\u9009\u9879\u3002\u5982\u679c\u540e\u8fb9\u8ddf\u4e0a\u76f8\u5e94\u7684\u9009\u9879\uff0c\u5219\u6253\u5f00\u6b64\u9009\u9879<\/td><\/tr>
-p<\/td>\u663e\u793a\u6240\u6709\u9009\u9879<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u663e\u793a\u6240\u6709\u7684\u914d\u7f6e\u9009\u9879\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# shopt -p <\/pre>\n\n\n\n

\u67e5\u770b\u6253\u5f00\u7684\u914d\u7f6e\u9009\u9879\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# shopt -s<\/pre>\n\n\n\n

\u67e5\u770b\u5173\u95ed\u7684\u914d\u7f6e\u9009\u9879\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# shopt -u<\/pre>\n","protected":false},"excerpt":{"rendered":"

shopt\u547d\u4ee4\u53ef\u4ee5\u8bbe\u7f6e\u54ea\u4e9b\u63a7\u5236\u7740Shell\u884c\u4e3a\u7279\u6027\u7684\u53d8\u91cf\u7684\u5f00\u5173\u503c\uff0c\u4ee5\u8fbe\u5230\u63a7\u5236Shell\u884c\u4e3a\u7684\u76ee\u7684\u3002\u5f53\u6267\u884c\u547d\u4ee4s […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3276"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=3276"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3276\/revisions"}],"predecessor-version":[{"id":3319,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3276\/revisions\/3319"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}