<?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>Rails</anon>
    <anon>Ruby</anon>
    <anon>Mac</anon>
  </categories>
  <description>調べていたので、書いていきます。 前提 Ruby 2.2.10 外部コマンドの呼び出し 実装で利用したは、#system, #`を利用していて、コマンドを実行して返却値、ステータスは無視するケースと返却値を利用するケースで分けて使っています。 Kernel.#system 引数を外部コマンドとして実行して、成功した時に真を返します。 子プロセスが終了ステータス 0 で終了すると成功とみなし true を返します。 それ以外の終了ステータスの場合は false を返します。 コマンドを実行できなかった場合は nil を返します。 終了ステータスは変数 $? で参照できます。 コマンドを実行するこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkikeda1104.hatenablog.com%2Fentry%2F2018%2F07%2F12%2F203000&quot; title=&quot;Rubyからシェルコマンドを実行する(Kernel.#system ..etc) - 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>https://cdn.user.blog.st-hatena.com/default_entry_og_image/94428665/1530603038405971</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-07-12 20:30:00</published>
  <title>Rubyからシェルコマンドを実行する(Kernel.#system ..etc)</title>
  <type>rich</type>
  <url>https://kikeda1104.hatenablog.com/entry/2018/07/12/203000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
