<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nonylene</author_name>
  <author_url>https://blog.hatena.ne.jp/nonylene/</author_url>
  <blog_title>Unyablog.</blog_title>
  <blog_url>https://nonylene.hatenablog.jp/</blog_url>
  <categories>
    <anon>Linux</anon>
    <anon>Shell</anon>
  </categories>
  <description>↓の記事を読んで自分でもサクッと作れそうなので作ってみた。 brennan.io 名前は nsh (nonylene shell の略)。記事を参考にコードを書いていたら大体同じようなものになってしまった。 github.com 記事では C で書いているけど、nsh では Python3 で書いてみた *1。結局パースで6割ぐらい占めていて、コマンドを実行するのはこの部分だけ。 def execute_line(args): pid = os.fork() if pid == 0: os.execvp(args[0], args) elif pid &lt; 0: print(&quot;error wit…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnonylene.hatenablog.jp%2Fentry%2F2016%2F12%2F09%2F004436&quot; title=&quot;軽い Shell を作った - Unyablog.&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-ak.f.st-hatena.com/images/fotolife/n/nonylene/20161209/20161209003000.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-12-09 00:44:36</published>
  <title>軽い Shell を作った</title>
  <type>rich</type>
  <url>https://nonylene.hatenablog.jp/entry/2016/12/09/004436</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
