{"id":1961,"date":"2019-09-10T19:31:59","date_gmt":"2019-09-10T10:31:59","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=1961"},"modified":"2021-07-18T16:16:04","modified_gmt":"2021-07-18T07:16:04","slug":"bash%e3%81%a7mustache%e3%83%86%e3%83%b3%e3%83%97%e3%83%ac%e3%83%bc%e3%83%88%e3%82%a8%e3%83%b3%e3%82%b8%e3%83%b3%e3%82%92%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=1961","title":{"rendered":"Bash\u3067Mustache\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u3046"},"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)\u4e0a\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u304a\u3044\u3066\u3001Mustache\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<pre><code># Download\ncurl -sSL https:\/\/git.io\/get-mo -o mo\n\n# Make executable\nchmod +x mo\n\n# Ensure destination folder exists\nmkdir -p ~\/.local\/bin\/\n\n# Move to the right folder\nmv mo ~\/.local\/bin\/\n\n# Test\n$ export TEST=\"This is a test\"\n$ echo \"Your message:  {{TEST}}\" | mo\nYour message:  This is a test\n\n<\/code><\/pre>\n<p><a href=\"https:\/\/github.com\/tests-always-included\/mo\">tests-always-included\/mo: Mustache templates in pure bash<\/a><\/p>\n<p>\u3061\u306a\u307f\u306b\u3001mustache\u306f<code>{{! }}<\/code>\u304c\u30b3\u30e1\u30f3\u30c8\u306b\u306a\u308b\u306e\u3067\u3001autohotkey\u306a\u3069\u306e\u8907\u6570\u884c\u306e\u30b3\u30e1\u30f3\u30c8\u304c\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u8a00\u8a9e\u306f\u3001Mustache\u3092\u51e6\u7406\u306e\u9593\u306b\u631f\u3080\u3053\u3068\u3067\u64ec\u4f3c\u7684\u306b\u8907\u6570\u884c\u30b3\u30e1\u30f3\u30c8\u304c\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>data-ahk-dev | mo &gt; \/mnt\/c\/pg\/autohotkey\/ahk_dev.ahk\nnkf --overwrite --oc=UTF-8-BOM \/mnt\/c\/pg\/autohotkey\/ahk_dev.ahk\npsl '. AutoHotkeyU64.exe C:\/pg\/autohotkey\/ahk_dev.ahk' &amp;\n<\/code><\/pre>\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)\u4e0a\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u304a\u3044\u3066\u3001M [&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":[1],"tags":[],"acf":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Rxwo-vD","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1961"}],"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=1961"}],"version-history":[{"count":2,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1961\/revisions"}],"predecessor-version":[{"id":2534,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1961\/revisions\/2534"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}