{"id":653,"date":"2019-04-30T00:23:09","date_gmt":"2019-04-29T16:23:09","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=653"},"modified":"2019-05-01T18:37:48","modified_gmt":"2019-05-01T10:37:48","slug":"col","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/col","title":{"rendered":"col\u547d\u4ee4 – \u7528\u4e8e\u8fc7\u6ee4\u63a7\u5236\u5b57\u7b26"},"content":{"rendered":"\n

\u529f\u80fd\u4ecb\u7ecd\uff1a<\/strong><\/p>\n\n\n\n

col\u547d\u4ee4\u7684\u82f1\u6587\u5168\u79f0\u662f\u201ccolation\u201d\uff0c\u5176\u4e2d\u6587\u91ca\u4e49\u5c31\u662f\u201c\u8fc7\u6ee4\u201d\u3002\u8be5\u547d\u4ee4\u662f\u4e00\u4e2a\u6807\u51c6\u8f93\u5165\u6587\u672c\u8fc7\u6ee4\u5668\uff0c\u5b83\u4ece\u6807\u6ce8\u8f93\u5165\u8bbe\u5907\u8bfb\u53d6\u6587\u672c\u5185\u5bb9\uff0c\u5e76\u628a\u5185\u5bb9\u663e\u793a\u5230\u6807\u6ce8\u8f93\u51fa\u8bbe\u5907\u3002 \u5728\u8bb8\u591aUNIX\u8bf4\u660e\u6587\u4ef6\u91cc\uff0c\u90fd\u6709RLF\u63a7\u5236\u5b57\u7b26\u3002\u5f53\u6211\u4eec\u8fd0\u7528shell\u7279\u6b8a\u5b57\u7b26”>”\u548c”>>”\uff0c\u628a\u8bf4\u660e\u6587\u4ef6\u7684\u5185\u5bb9\u8f93\u51fa\u6210\u7eaf\u6587\u672c\u6587\u4ef6\u65f6\uff0c\u63a7\u5236\u5b57\u7b26\u4f1a\u53d8\u6210\u4e71\u7801\uff0ccol\u6307\u4ee4\u5219\u80fd\u6709\u6548\u6ee4\u9664\u8fd9\u4e9b\u63a7\u5236\u5b57\u7b26\u3002 <\/p>\n\n\n\n

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

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-b<\/td>\u8fc7\u6ee4\u6389\u6240\u6709\u7684\u63a7\u5236\u5b57\u7b26\uff0c\u5305\u62ecRLF\u548cHRLF <\/td><\/tr>
-f<\/td>\u6ee4\u9664RLF\u5b57\u7b26\uff0c\u4f46\u5141\u8bb8\u5c06HRLF\u5b57\u7b26\u5448\u73b0\u51fa\u6765 <\/td><\/tr>
-x<\/td>\u4ee5\u591a\u4e2a\u7a7a\u683c\u5b57\u7b26\u6765\u8868\u793a\u8df3\u683c\u5b57\u7b26 <\/td><\/tr>
-l<\u7f13\u51b2\u533a\u5217\u6570><\/td>\u9884\u8bbe\u7684\u5185\u5b58\u7f13\u51b2\u533a\u6709128\u5217\uff0c\u60a8\u53ef\u4ee5\u81ea\u884c\u6307\u5b9a\u7f13\u51b2\u533a\u7684\u5927\u5c0f <\/td><\/tr><\/tbody><\/table>\n\n\n\n

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

\u5c06man\u547d\u4ee4\u7684\u5e2e\u52a9\u6587\u6863\u4fdd\u5b58\u4e3aman_help\uff0c\u4f7f\u7528-b \u53c2\u6570\u8fc7\u6ee4\u6240\u6709\u63a7\u5236\u5b57\u7b26\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# man man | col-b > man_help  <\/pre>\n\n\n\n

\u5c06man\u7684\u8bf4\u660e\u6587\u4ef6\u8f6c\u5b58\u4e3a\u7eaf\u6587\u672c\u6587\u4ef6\u5e76\u8fc7\u6ee4\u6389\u6240\u6709\u63a7\u5236\u5b57\u7b26 \uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# man col | col -b > file<\/pre>\n\n\n\n

\u5229\u7528 cat -A \u663e\u793a\u51fa\u6240\u6709\u7279\u6b8a\u6309\u952e\uff0c\u6700\u540e\u4ee5 col \u5c06 \u8f6c\u6210\u7a7a\u767d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cat -A \/etc\/man.config<\/pre>\n\n\n\n

\u5c06 col \u7684 man page \u8f6c\u5b58\u6210\u4e3a \/root\/col.man \u7684\u7eaf\u6587\u672c\u6863\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# man col | col -b > \/root\/col.man<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u529f\u80fd\u4ecb\u7ecd\uff1a col\u547d\u4ee4\u7684\u82f1\u6587\u5168\u79f0\u662f\u201ccolation\u201d\uff0c\u5176\u4e2d\u6587\u91ca\u4e49\u5c31\u662f\u201c\u8fc7\u6ee4\u201d\u3002\u8be5\u547d\u4ee4\u662f\u4e00\u4e2a\u6807\u51c6\u8f93\u5165\u6587\u672c\u8fc7\u6ee4\u5668 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/653"}],"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=653"}],"version-history":[{"count":15,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/653\/revisions\/1849"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}