<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kikeda1104</author_name>
  <author_url>https://blog.hatena.ne.jp/kikeda1104/</author_url>
  <blog_title>kikeda1104's blog</blog_title>
  <blog_url>https://kikeda1104.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>外部コマンドで、ファイルパスを渡す際にエスケープが必要になり探していたら見つけた。 前提 ruby 2.2.10 rails 4.2.x.x コマンドまたは引数の文字列をエスケープ require 'shellwords' file_name = 'tmp/file_name1（１）.txt' system &quot;ls -lShellwords.escape \'#{file_name}'\&quot; 参考 docs.ruby-lang.org docs.ruby-lang.org</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkikeda1104.hatenablog.com%2Fentry%2F2018%2F07%2F23%2F210000&quot; title=&quot;shellコマンドのエスケープ[Ruby] - kikeda1104&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-07-23 21:00:00</published>
  <title>shellコマンドのエスケープ[Ruby]</title>
  <type>rich</type>
  <url>https://kikeda1104.hatenablog.com/entry/2018/07/23/210000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
