{"id":27552,"date":"2015-02-12T20:13:19","date_gmt":"2015-02-12T11:13:19","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=27552"},"modified":"2015-02-12T20:13:20","modified_gmt":"2015-02-12T11:13:20","slug":"shell-check","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/shell-check\/","title":{"rendered":"ShellCheck - \u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u554f\u984c\u70b9\u3092\u6307\u6458\u3057\u3066\u304f\u308c\u308b\u30aa\u30f3\u30e9\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\u30fb\u30c4\u30fc\u30eb"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/02\/IShellCheck.jpg\" alt=\"ShellCheck\" title=\"ShellCheck.jpg\" border=\"0\" width=\"546\" height=\"211\" \/><\/p>\n<p>UNIX\u4f5c\u696d\u306e\u52b9\u7387\u5316\u306b\u6b20\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u8ab0\u3067\u3082\u7c21\u5358\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u53cd\u9762\u3001\u69d8\u3005\u306a\u843d\u3068\u3057\u7a74\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3082\u77e5\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u300c<a href=\"http:\/\/www.shellcheck.net\/\">ShellCheck<\/a>\u300d\u306f\u305d\u3093\u306a\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u843d\u3068\u3057\u7a74\u306b\u306f\u307e\u3089\u306a\u3044\u3088\u3046\u3001sh\/bash \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u554f\u984c\u70b9\u3092\u5206\u6790\u3057\u3001\u6307\u6458\u3057\u3066\u304f\u308c\u308b\u30aa\u30f3\u30e9\u30a4\u30f3\u30b5\u30fc\u30d3\u30b9\u517c\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u2026<\/p>\n<pre><code class=\"sh\">#!\/usr\/bin\/env bash\n## Example of a broken script. Hit the Down Arrow button to ShellCheck it!\nfor f in $(ls *.m3u)\ndo\n  grep -qi hq.*mp3 $f \\\n    &amp;&amp; echo 'Playlist $f contains a HQ file in mp3 format' \ndone\n\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u554f\u984c\u70b9\u30925\u3064\u3082\u6307\u6458\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/02\/IShellCheck-1.jpg\" alt=\"ShellCheck 1\" title=\"ShellCheck-1.jpg\" border=\"0\" width=\"546\" height=\"298\" \/><\/p>\n<p>\u305d\u308c\u305e\u308c\u3001\u306a\u305c\u8b66\u544a\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3001<a href=\"https:\/\/github.com\/koalaman\/shellcheck\/wiki\/SC2045\">\u7406\u7531\u3092\u30ea\u30f3\u30af\u4ed8\u304d\u3067\u89e3\u8aac<\/a>\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u305f\u3060\u5358\u306b\u9593\u9055\u3044\u3060\u3068\u3044\u308f\u308c\u308b\u3088\u308a\u3082\u7d0d\u5f97\u3057\u3084\u3059\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>ShellCheck\u306f\u3001Haskell\u3067\u4f5c\u3089\u308c\u305f\u30c4\u30fc\u30eb\u3067\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002Debian \/ RedHat \/ Mac OS X\u7528\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306f<a href=\"https:\/\/github.com\/koalaman\/shellcheck\">GitHub<\/a>\u306b\u8a73\u3057\u304f\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u6700\u8fd1\u59cb\u3081\u305f\u65b9\u3084(<a href=\"https:\/\/softantenna.com\/blog\/software\/shell-script-books\/\">\u79c1\u3082\u2026<\/a>)\u3001\u305f\u307e\u306b\u3057\u304b\u4f7f\u308f\u306a\u3044\u306e\u3067\u66f8\u304d\u65b9\u3092\u5fd8\u308c\u305f\u3068\u3044\u3046\u65b9\u306b\u30aa\u30b9\u30b9\u30e1\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UNIX\u4f5c\u696d\u306e\u52b9\u7387\u5316\u306b\u6b20\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u8ab0\u3067\u3082\u7c21\u5358\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u53cd\u9762\u3001\u69d8\u3005\u306a\u843d\u3068\u3057\u7a74\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3082\u77e5\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u300cShellCheck\u300d\u306f\u305d\u3093\u306a\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u843d\u3068\u3057\u7a74\u306b\u306f\u307e\u3089\u306a\u3044\u3088 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":27550,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[66,75],"tags":[1383],"class_list":["post-27552","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webservice","category-software","tag-shell"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/27552","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=27552"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/27552\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/27550"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=27552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=27552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=27552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}