<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tmtms</author_name>
  <author_url>https://blog.hatena.ne.jp/tmtms/</author_url>
  <blog_title>tmtms のメモ</blog_title>
  <blog_url>https://blog.tmtms.net/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Ruby でシェルのようなものを作ってみると、Ruby とシェルやシステムコールの理解ができて、研修の課題とかにいいんじゃないかと10年くらい前に思ってたのを、ふと思い出したので書いてみます。 基本 シェルの動作を簡単に説明すると次のような感じです。 プロンプトを出力 標準入力からコマンドラインを読み込む 読み込んだコマンドを実行する コマンドの終了を待つ 1 に戻る これをそのまま Ruby で書いてみます。 while true print '-&gt; ' # プロンプト表示 cmd = gets or break # コマンド入力 cmd.chomp! # 末尾の改行削除 pid = Pro…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F2013%2F10%2F09%2Fsheru&quot; title=&quot;Rubyでシェルもどきを作る - tmtms のメモ&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>http://tatsu-zine.com/images/books/87/cover_s.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-10-09 02:10:52</published>
  <title>Rubyでシェルもどきを作る</title>
  <type>rich</type>
  <url>https://blog.tmtms.net/entry/2013/10/09/sheru</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
