{"id":99172,"date":"2022-06-23T08:23:41","date_gmt":"2022-06-22T23:23:41","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=99172"},"modified":"2022-06-23T08:23:41","modified_gmt":"2022-06-22T23:23:41","slug":"unix-command-line-convertions","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/unix-command-line-convertions\/","title":{"rendered":"\u5909\u308f\u3089\u306a\u3044\u3088\u3046\u3067\u5909\u308f\u3063\u3066\u3044\u308b\u3001UNIX\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u898f\u7d04\u306e\u5909\u9077"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2022\/06\/s_20220620_172017.jpg\" alt=\"S 20220620 172017\" title=\"s_20220620_172017.jpg\" border=\"0\" width=\"1022\" height=\"535\" \/><\/p>\n<p>UNIX\u74b0\u5883\u3067\u306f\u3055\u307e\u3056\u307e\u306a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u99c6\u4f7f\u3057\u3066\u4f5c\u696d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u306fUNIX\u306e\u8a95\u751f\u3068\u3068\u3082\u306b\u5b58\u5728\u3059\u308b\u3053\u3068\u304b\u3089\u3001\u4f55\u306e\u5909\u5316\u3082\u306a\u304f\u4f7f\u308f\u308c\u7d9a\u3051\u3066\u3044\u308b\u3088\u3046\u306b\u601d\u3048\u307e\u3059\u304c\u3001\u5b9f\u306f\u6642\u4ee3\u3068\u3068\u3082\u306b\u69cb\u6587\u304c\u5927\u304d\u304f\u5909\u308f\u3063\u3066\u304d\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>UNIX\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u898f\u7d04\u306e\u5909\u9077\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6587\u66f8\u300c<a href=\"https:\/\/blog.liw.fi\/posts\/2022\/05\/07\/unix-cli\/\">Unix command line conventions over time<\/a>\u300d\u304c\u3001\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u8005Lars Wirzenius\u6c0f\u306b\u3088\u3063\u3066\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u5f90\u3005\u306b\u591a\u6a5f\u80fd\u5316\u304c\u9032\u3080<\/h2>\n<p>\u540c\u6587\u66f8\u306b\u3088\u308b\u3068\u3001UNIX\u306e\u9ece\u660e\u671f\u3067\u3042\u308b1970\u5e74\u4ee3\u524d\u534a\u306b\u3001UNIX\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u898f\u7d04\u306e\u57fa\u790e\u304c\u5f62\u4f5c\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u521d\u671f\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u5f15\u6570\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u4e0e\u3048\u3089\u308c\u308c\u3070\u305d\u308c\u3092\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u4e0e\u3048\u3089\u308c\u306a\u3051\u308c\u3070\u6a19\u6e96\u5165\u529b\u3092\u8aad\u307f\u8fbc\u307f\u3001\u51fa\u529b\u3092\u6a19\u6e96\u51fa\u529b\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5b58\u5728\u3057\u306a\u3044\u304b\u3001\u5c11\u6570\u306e\u56fa\u5b9a\u7684\u306a\u3082\u306e\u3057\u304b\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u305d\u3046\u3067\u3059\u3002<\/p>\n<pre>\r\n$cat *.txt|wc\r\n<\/pre>\n<p>\u4f8b\u3048\u3070\u4e0a\u306e\u4f8b\u306f\u3001*.txt\u30d5\u30a1\u30a4\u30eb\u3092\u5168\u3066\u8aad\u307f\u8fbc\u3053\u3093\u3067\u6a19\u6e96\u51fa\u529b\u306b\u66f8\u304d\u8fbc\u307f\u3001wc\u306f\u30d1\u30a4\u30d7\u7d4c\u7531\u3067\u6a19\u6e96\u5165\u529b\u3092\u8aad\u307f\u8fbc\u307f\u3001\u5358\u8a9e\u6570\u3092\u6570\u3048\u3001\u6a19\u6e96\u51fa\u529b\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5f8c\u3001\u30c0\u30c3\u30b7\u30e51\u3064\u30681\u3064\u306e\u6587\u5b57\u3067\u69cb\u6210\u3055\u308c\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5024\u304c\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u62e1\u5f35\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>\r\n$ sort -k1\r\n$ sort -k 1\r\n<\/pre>\n<p>\u4e0a\u306e\u4f8b\u306fsort\u30b3\u30de\u30f3\u30c9\u306e\u300c-k\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5024\u300c1\u3092\u6e21\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>1980\u5e74\u306bC\u30e9\u30a4\u30d6\u30e9\u30ea\u95a2\u6570getopt\u304c\u66f8\u304b\u308c\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u89e3\u6790\u51e6\u7406\u306e\u5171\u901a\u5316\u304c\u56f3\u3089\u308c\u307e\u3059\u3002\u307e\u305f\u9577\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5c0e\u5165\u3055\u308c\u3001X window system\u3067\u4f7f\u7528\u3055\u308c\u308b\u300c-display\u300d\u306e\u3088\u3046\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u4f7f\u7528\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8907\u96d1\u5316\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u89e3\u6790\u306b\u591a\u5927\u306a\u8ca2\u732e\u3092\u679c\u305f\u3057\u305f\u306e\u304cGNU\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u5024\u306e\u6307\u5b9a\u306b\u7b49\u53f7(=)\u3092\u4f7f\u3046\u6a5f\u80fd\u304c\u5c0e\u5165\u3055\u308c\u307e\u3059\u3002GNU\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3057\u305fgetopt_long\u95a2\u6570\u306b\u3088\u3063\u3066\u3001\u8907\u96d1\u306a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u89e3\u6790\u51e6\u7406\u3092\u3001\u3055\u307e\u3056\u307e\u306a\u30c4\u30fc\u30eb\u304b\u3089\u547c\u3073\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>\r\n$grep-xi*.txt--regexp=foo --regexp bar\r\n<\/pre>\n<p>\u4e0a\u306e\u4f8b\u3067\u306f\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3042\u308b\u300c-x\u300d\u3068\u300c-i\u300d\u3001\u3055\u3089\u306b\u9577\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u300c--regexp\u300d\u306e\u7b49\u53f7\u304c\u3042\u308b\u3082\u306e\u3068\u306a\u3044\u3082\u306e\u304c\u540c\u6642\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002GNU\u306f\u307e\u305f\u6a19\u6e96\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u3057\u3066\u3001\u300c--help\u300d\u300c--version\u300d\u306a\u3069\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>1980\u5e74\u306e\u7d42\u308f\u308a\u9803\u306b\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u69cb\u6587\u898f\u7d04\u306b\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u30021990\u5e74\u304b\u3089\u4f7f\u7528\u3055\u308c\u3066\u3044\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30c4\u30fc\u30ebCVS\u306f\u6700\u521d\u304b\u3089\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u88c5\u5099\u3057\u3066\u304a\u308a\u3001\u30c1\u30a7\u30c3\u30af\u30a4\u30f3\u6642\u306b\u4f7f\u7528\u3059\u308b\u300cci\u300d\u3084\u3001\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u6642\u306b\u4f7f\u7528\u3059\u308b\u300cco\u300d\u306a\u3069\u306e\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u642d\u8f09\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre>\r\n$ cvs ci ...\r\n$ cvs co ...\r\n<\/pre>\n<p>Subversion\u3001Arch\u3001Git\u306a\u3069\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u3053\u306e\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u30d1\u30bf\u30fc\u30f3\u3092\u8e0f\u8972\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4e00\u898b\u5909\u5316\u304c\u306a\u3055\u305d\u3046\u306b\u601d\u3048\u308b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3067\u3059\u304c\u3001\u9577\u3044\u6642\u9593\u3092\u304b\u3051\u3001\u3086\u3063\u304f\u308a\u3068\u9032\u5316\u3057\u3066\u304d\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u8907\u96d1\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u6307\u5b9a\u65b9\u6cd5\u3082\u3001\u305d\u306e\u898f\u7d04\u304c\u751f\u307e\u308c\u305f\u80cc\u666f\u3092\u8003\u3048\u308b\u3068\u7406\u89e3\u3057\u3084\u3059\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UNIX\u74b0\u5883\u3067\u306f\u3055\u307e\u3056\u307e\u306a\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u99c6\u4f7f\u3057\u3066\u4f5c\u696d\u3092\u884c\u3044\u307e\u3059\u3002 \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u306fUNIX\u306e\u8a95\u751f\u3068\u3068\u3082\u306b\u5b58\u5728\u3059\u308b\u3053\u3068\u304b\u3089\u3001\u4f55\u306e\u5909\u5316\u3082\u306a\u304f\u4f7f\u308f\u308c\u7d9a\u3051\u3066\u3044\u308b\u3088\u3046\u306b\u601d\u3048\u307e\u3059\u304c\u3001\u5b9f\u306f\u6642\u4ee3\u3068\u3068\u3082\u306b\u69cb\u6587\u304c\u5927\u304d\u304f\u5909\u308f\u3063\u3066 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":99268,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[66],"tags":[3302],"class_list":["post-99172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webservice","tag-unix"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/99172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=99172"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/99172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/99268"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=99172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=99172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=99172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}