{"title":"shell\u30b3\u30de\u30f3\u30c9\u306e\u30a8\u30b9\u30b1\u30fc\u30d7[Ruby]","image_url":null,"author_url":"https://blog.hatena.ne.jp/kikeda1104/","published":"2018-07-23 21:00:00","author_name":"kikeda1104","version":"1.0","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkikeda1104.hatenablog.com%2Fentry%2F2018%2F07%2F23%2F210000\" title=\"shell\u30b3\u30de\u30f3\u30c9\u306e\u30a8\u30b9\u30b1\u30fc\u30d7[Ruby] - kikeda1104&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://kikeda1104.hatenablog.com/","url":"https://kikeda1104.hatenablog.com/entry/2018/07/23/210000","width":"100%","type":"rich","provider_url":"https://hatena.blog","blog_title":"kikeda1104's blog","categories":["Ruby"],"provider_name":"Hatena Blog","description":"\u5916\u90e8\u30b3\u30de\u30f3\u30c9\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3092\u6e21\u3059\u969b\u306b\u30a8\u30b9\u30b1\u30fc\u30d7\u304c\u5fc5\u8981\u306b\u306a\u308a\u63a2\u3057\u3066\u3044\u305f\u3089\u898b\u3064\u3051\u305f\u3002 \u524d\u63d0 ruby 2.2.10 rails 4.2.x.x \u30b3\u30de\u30f3\u30c9\u307e\u305f\u306f\u5f15\u6570\u306e\u6587\u5b57\u5217\u3092\u30a8\u30b9\u30b1\u30fc\u30d7 require 'shellwords' file_name = 'tmp/file_name1\uff08\uff11\uff09.txt' system \"ls -lShellwords.escape \\'#{file_name}'\\\" \u53c2\u8003 docs.ruby-lang.org docs.ruby-lang.org"}