<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>spitfire_tree</author_name>
  <author_url>https://blog.hatena.ne.jp/spitfire_tree/</author_url>
  <blog_title>happy lie, happy life</blog_title>
  <blog_url>https://spitfire-tree.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>はじめに Ruby から外部のコマンドを実行する場合、使えるメソッドは以下のとおりです。 exec system `` IO.popen これらそれぞれの使い方と、実行結果を解説します。 exec exec はコマンドの失敗時にエラーを返す他は何ら値を返しません。irb で実行するとこんな感じ。 irb(main):001:0&gt; exec(&quot;ruby -v&quot;) ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] そして irb は終了してしまいました。 system system ではコマンドが成功すると true を、失敗すると false…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fspitfire-tree.hatenadiary.org%2Fentry%2F20080809%2F1218266645&quot; title=&quot;外部のコマンドを実行 - happy lie, happy life&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>2008-08-09 16:24:05</published>
  <title>外部のコマンドを実行</title>
  <type>rich</type>
  <url>https://spitfire-tree.hatenadiary.org/entry/20080809/1218266645</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
