{"id":2157,"date":"2020-01-09T15:25:46","date_gmt":"2020-01-09T06:25:46","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=2157"},"modified":"2021-07-18T15:09:17","modified_gmt":"2021-07-18T06:09:17","slug":"linux%e3%83%bbbash%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%a7%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%a7%e4%b8%a6%e3%81%b3%e6%9b%bf%e3%81%88%e3%82%bd%e3%83%bc%e3%83%88%e3%81%99%e3%82%8b%e6%96%b9","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=2157","title":{"rendered":"Linux\u30fbBash\u30b3\u30de\u30f3\u30c9\u3067\u6b63\u898f\u8868\u73fe\u3067\u4e26\u3073\u66ff\u3048(\u30bd\u30fc\u30c8)\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Linux\u30d1\u30bd\u30b3\u30f3\u30fb\u30b5\u30fc\u30d0\u30fc\u306eBash\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e(\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u8a00\u8a9e)\u3067\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u304a\u3044\u3066\u3001\u6b63\u898f\u8868\u73fe\u3067\u4e26\u3073\u66ff\u3048\u64cd\u4f5c\u3001\u30bd\u30fc\u30c8\u64cd\u4f5c\u3092\u30b3\u30de\u30f3\u30c9\u3067\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51fa\u529b\u306e\u3046\u3061\u3001\u65e5\u4ed8\u306e\u90e8\u5206\u3067\u30bd\u30fc\u30c8\u3057\u305f\u3044\u3001\u3068\u3044\u3046\u5834\u5408\u3002<\/p>\n<pre><code>$ skd-check 14\nINFO: You have 5 tasks in this 14 days.\n\n\n# note:: rapidgator \u89e3\u7d04 :skd:7\/13\n# note:: \u3054\u307f\u3059\u3066 \u3082\u3048\u306a\u3044\u3054\u307f :skd:7\/19\n# note:: something :skd:7\/6T12:00\n# note:: \u56f3\u66f8\u9928 \u672c\u8fd4\u5374 :skd:7\/15\n\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3002<\/p>\n<pre><code>\n$ skd-check 14 | python3 -c \"import sys,re,json; print( re.sub(r'.*\\s:(skd|schedule):(\\d{1,2}(-|\\\/)\\d{1,2}[?]?(T[0-9]{1,2}:[0-9]{1,2})?[?]?).*', '\\g&lt;2&gt;\\t\\g&lt;0&gt;', sys.stdin.read()) )\" | sort -V | sed 's\/\\S*\\t\/\/'\nINFO: You have 5 tasks in this 14 days.\n\n\n\n# note:: something :skd:7\/6T12:00\n# note:: rapidgator \u89e3\u7d04 :skd:7\/13\n# note:: \u56f3\u66f8\u9928 \u672c\u8fd4\u5374 :skd:7\/15\n# note:: \u3054\u307f\u3059\u3066 \u3082\u3048\u306a\u3044\u3054\u307f :skd:7\/19\n<\/code><\/pre>\n<p>\u7406\u5c48\u3068\u3057\u3066\u306f\u3001\u307e\u305a\u6b63\u898f\u8868\u73fe\u3067\u90fd\u5408\u306e\u3044\u3044\u3068\u3053\u308d\u3092\u30b0\u30eb\u30fc\u30d7\u3057\u3066\u884c\u306e\u5148\u982d\u306b\u6301\u3063\u3066\u304d\u307e\u3059\u3002\u305d\u3057\u3066\u6b21\u306b\u30bf\u30d6\u306a\u3069\u3067\u533a\u5207\u3063\u3066\u304b\u3089\u5168\u4f53\u30de\u30c3\u30c1\u3092\u30da\u30fc\u30b9\u30c8\u3002<br \/>\n\u4eca\u56de\u306f\u6b63\u898f\u8868\u73fe\u3068\u3057\u3066Python\u3092\u4f7f\u3063\u3066\u307e\u3059\u304c\u3001\u7c21\u5358\u306a\u3082\u306e\u306a\u3089sed\u3067\u3082\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305d\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51fa\u529b\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code>$ skd-check 14 | python3 -c \"import sys,re,json; print( re.sub(r'.*\\s:(skd|schedule):(\\d{1,2}(-|\\\/)\\d{1,2}[?]?(T[0-9]{1,2}:[0-9]{1,2})?[?]?).*', '\\g&lt;2&gt;\\t\\g&lt;0&gt;', sys.stdin.read()) )\"\nINFO: You have 5 tasks in this 14 days.\n\n\n7\/13    # note:: rapidgator \u89e3\u7d04 :skd:7\/13\n7\/19    # note:: \u3054\u307f\u3059\u3066 \u3082\u3048\u306a\u3044\u3054\u307f :skd:7\/19\n7\/6T12:00       # note:: something :skd:7\/6T12:00\n7\/15    # note:: \u56f3\u66f8\u9928 \u672c\u8fd4\u5374 :skd:7\/15\n<\/code><\/pre>\n<p>\u6b21\u306b<code>sort -V<\/code>\u3067\u5148\u982d\u306e\u6570\u5024\u90e8\u5206\u3092\u53c2\u8003\u306b\u30bd\u30fc\u30c8\u3055\u308c\u307e\u3059\u3002\u6700\u5f8c\u306b<code>sed 's\/\\S*\\t\/\/'<\/code>\u3067\u8ffd\u52a0\u3057\u305f\u5148\u982d\u306e\u90e8\u5206\u3092\u524a\u9664\u3057\u3066\u5b8c\u4e86\u3001\u3068\u3044\u3046\u5177\u5408\u3002<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/8680561\/bash-sort-by-regexp\">linux &#8211; Bash sort by regexp &#8211; Stack Overflow<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u30d1\u30bd\u30b3\u30f3\u30fb\u30b5\u30fc\u30d0\u30fc\u306eBash\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e(\u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0\u8a00\u8a9e)\u3067\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u304a\u3044\u3066\u3001\u6b63 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[63],"tags":[],"acf":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Rxwo-yN","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/2157"}],"collection":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2157"}],"version-history":[{"count":2,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/2157\/revisions"}],"predecessor-version":[{"id":2483,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/2157\/revisions\/2483"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}