{"id":6676,"date":"2020-03-18T14:35:39","date_gmt":"2020-03-18T06:35:39","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6676"},"modified":"2020-03-18T14:35:40","modified_gmt":"2020-03-18T06:35:40","slug":"shuf","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/shuf","title":{"rendered":"shuf\u547d\u4ee4 – \u4ea7\u751f\u968f\u673a\u7684\u6392\u5217"},"content":{"rendered":"\n

shuf\u547d\u4ee4\u5c06\u8f93\u5165\u7684\u5185\u5bb9\u968f\u673a\u6392\u5217\u5e76\u8f93\u51fa\u3002 shuf\u547d\u4ee4\u5f53\u6ca1\u6709\u6587\u4ef6\u6216\u6587\u4ef6\u4e3a-\u65f6\uff0c\u8bfb\u53d6\u6807\u51c6\u8f93\u5165\u3002 <\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> shuf [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570:<\/strong><\/p>\n\n\n\n

-e<\/td>\u5c06\u6bcf\u4e2aARG\u89c6\u4e3a\u8f93\u5165\u884c<\/td><\/tr>
-i<\/td>\u5c06\u6570\u5b57\u8303\u56f4LO\uff08\u6700\u4f4e\uff09\u5230HI\uff08\u6700\u9ad8\uff09\u4e4b\u95f4\u7684\u4f5c\u4e3a\u8f93\u5165\u884c<\/td><\/tr>
--help<\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\u5e76\u9000\u51fa<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u6a21\u62df\u786c\u5e01\u629b\u63b7\uff0c\u83b7\u53d6\u524d10\u4e2a\u7ed3\u679c\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# shuf -r -n 10 -e \"\u6b63\u9762\" -e \"\u53cd\u9762\"\n\u53cd\u9762\n\u6b63\u9762\n\u6b63\u9762\n\u6b63\u9762\n\u53cd\u9762\n\u53cd\u9762\n\u53cd\u9762\n\u6b63\u9762\n\u6b63\u9762\n\u6b63\u9762<\/pre>\n\n\n\n

\u6a21\u62df\u4f53\u5f69\u8d85\u7ea7\u5927\u4e50\u900f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# shuf -i 1-35 -n 5|sort -n && shuf -i 1-12 -n 2|sort -n\n4\n17\n20\n29\n31\n6\n11<\/pre>\n","protected":false},"excerpt":{"rendered":"

shuf\u547d\u4ee4\u5c06\u8f93\u5165\u7684\u5185\u5bb9\u968f\u673a\u6392\u5217\u5e76\u8f93\u51fa\u3002 shuf\u547d\u4ee4\u5f53\u6ca1\u6709\u6587\u4ef6\u6216\u6587\u4ef6\u4e3a-\u65f6\uff0c\u8bfb\u53d6\u6807\u51c6\u8f93\u5165\u3002 \u8bed\u6cd5\u683c\u5f0f: sh […]<\/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\/6676"}],"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=6676"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6676\/revisions"}],"predecessor-version":[{"id":6787,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6676\/revisions\/6787"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}