{"id":1983,"date":"2019-05-16T23:23:25","date_gmt":"2019-05-16T15:23:25","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1983"},"modified":"2022-05-20T16:09:48","modified_gmt":"2022-05-20T08:09:48","slug":"bash","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/bash","title":{"rendered":"bash\u547d\u4ee4 – \u547d\u4ee4\u7ec8\u7aef\u89e3\u91ca\u5668"},"content":{"rendered":"\n
bash\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cBourne shell\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u547d\u4ee4\u7ec8\u7aef\u89e3\u91ca\u5668\u3002bash\u662f\u7edd\u5927\u591a\u6570Linux\u7cfb\u7edf\u9ed8\u8ba4\u7684\u547d\u4ee4\u7ec8\u7aef\u89e3\u91ca\u5668\uff0c\u80fd\u591f\u5904\u7406\u7528\u6237\u6240\u8f93\u5165\u7684\u547d\u4ee4\uff0c\u4ee5\u53ca\u6267\u884c\u6307\u5b9a\u7684Shell\u811a\u672c\u6587\u4ef6\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f<\/strong>\uff1abash [\u53c2\u6570] \u6587\u4ef6<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570<\/strong>\uff1a<\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u4f7f\u7528-n\u53c2\u6570\u68c0\u67e5\u811a\u672c\u8bed\u6cd5\u65f6\u5019\u6b63\u786e\uff1a<\/p>\n\n\n\n \u4f7f\u7528-x\u53c2\u6570\u6267\u884clinuxcool.sh\u811a\u672c\u5e76\u8f93\u51fa\u6267\u884c\u8fc7\u7a0b\uff1a<\/p>\n\n\n\n bash\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cBourne shell\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u547d\u4ee4\u7ec8\u7aef\u89e3\u91ca\u5668\u3002bash\u662f\u7edd\u5927\u591a\u6570Lin […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1983"}],"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=1983"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1983\/revisions"}],"predecessor-version":[{"id":9882,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1983\/revisions\/9882"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-n<\/td> \u68c0\u6d4b\u811a\u672c\u662f\u5426\u6b63\u786e\u672c<\/td><\/tr> -x<\/td> \u8f93\u51fa\u6267\u884c\u8fc7\u7a0b<\/td><\/tr> -c<\/td> \u4ece\u5b57\u7b26\u4e32\u4e2d\u8bfb\u5165\u547d\u4ee4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# bash -n linuxcool.sh<\/strong><\/pre>\n\n\n\n
[root@linuxcool ~]# bash -x linuxcool.sh <\/strong>\r\n+ pwd\r\n\/root\r\n+ uptime\r\n 16:09:14 up 6 min, 1 user, load average: 0.24, 0.09, 0.03\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"