{"id":2333,"date":"2015-10-13T11:08:48","date_gmt":"2015-10-13T02:08:48","guid":{"rendered":"http:\/\/blog.rutake.com\/techmemo\/?p=2333"},"modified":"2015-10-13T11:08:48","modified_gmt":"2015-10-13T02:08:48","slug":"%e3%82%b7%e3%82%a7%e3%83%ab%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e5%bc%95%e6%95%b0%e3%81%ae%e6%95%b0%e3%83%81%e3%82%a7%e3%83%83%e3%82%af","status":"publish","type":"post","link":"https:\/\/blog.rutake.com\/techmemo\/2015\/10\/13\/%e3%82%b7%e3%82%a7%e3%83%ab%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e5%bc%95%e6%95%b0%e3%81%ae%e6%95%b0%e3%83%81%e3%82%a7%e3%83%83%e3%82%af\/","title":{"rendered":"\u30b7\u30a7\u30eb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u5f15\u6570\u306e\u6570\u30c1\u30a7\u30c3\u30af $#"},"content":{"rendered":"<p>Linux\u306e\u30b7\u30a7\u30eb(\/bin\/sh)\u306e\u77ed\u671f\u96c6\u4e2d\u30b7\u30ea\u30fc\u30ba<br \/>\nbash\u3060\u3068\u3082\u3063\u3068\u591a\u6a5f\u80fd\u3060\u3051\u3069\u3001\u3069\u3053\u3067\u3082\u52d5\u304f\u3088\u3046\u306b\u306a\u308b\u3079\u304fsh\u3092\u4f7f\u3046\u3002<\/p>\n<p>\u7b2c\u4e00\u56de\u76ee\u306f\u5f15\u6570\u306e\u6570\u30c1\u30a7\u30c3\u30af\u3002<\/p>\n<p>\u5229\u7528\u7528\u9014\u3068\u3057\u3066\u306f\u5f15\u6570\u304c\u306a\u304b\u3063\u305f\u3089\u8aac\u660e\u3092\u51fa\u3059\u306a\u3069\u3002<\/p>\n<p>[shell]<br \/>\nif [ $# -eq 0 ]; then<br \/>\n  echo &#8220;$0 \u5229\u7528\u65b9\u6cd5\uff1a\u5f15\u6570\uff11&#8221;<br \/>\n  exit 1<br \/>\nfi<br \/>\n[\/shell]<\/p>\n<p>$#\u304c\u5f15\u6570\u306e\u6570\u3092\u8868\u3057\u3066\u304a\u308a\u30010\u3060\u3063\u305f\u3089\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u3002<br \/>\n$0\u306f\u3053\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u81ea\u4f53\u306e\u540d\u79f0\u3067\u3042\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u306e\u30b7\u30a7\u30eb(\/bin\/sh)\u306e\u77ed\u671f\u96c6\u4e2d\u30b7\u30ea\u30fc\u30ba bash\u3060\u3068\u3082\u3063\u3068\u591a\u6a5f\u80fd &hellip; <a href=\"https:\/\/blog.rutake.com\/techmemo\/2015\/10\/13\/%e3%82%b7%e3%82%a7%e3%83%ab%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e5%bc%95%e6%95%b0%e3%81%ae%e6%95%b0%e3%83%81%e3%82%a7%e3%83%83%e3%82%af\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[466],"tags":[467],"_links":{"self":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts\/2333"}],"collection":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/comments?post=2333"}],"version-history":[{"count":1,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts\/2333\/revisions"}],"predecessor-version":[{"id":2334,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/posts\/2333\/revisions\/2334"}],"wp:attachment":[{"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/media?parent=2333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/categories?post=2333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rutake.com\/techmemo\/wp-json\/wp\/v2\/tags?post=2333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}