<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>liaoyuan</author_name>
  <author_url>https://blog.hatena.ne.jp/liaoyuan/</author_url>
  <blog_title>Going Faraway</blog_title>
  <blog_url>https://liaoyuan.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>ぐぐってもあまり情報が出てこなかったのでメモ。Bashで 「$?」を使えば実行したコマンドの戻り値が取得できるのは有名。 $ false; echo $? 1 # falseの戻り値 Bashの場合、パイプされたコマンドの戻り値は 「PIPESTATUS」という配列に格納されることも、それなりに知られていると思う。 $ true | true | false $ echo ${PIPESTATUS[0]} ${PIPESTATUS[1]} ${PIPESTATUS[2]} 0 0 1 # true, true, falseの戻り値 ところが、バッククオートや 「$()」 によるコマンド置換の中…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fliaoyuan.hatenablog.jp%2Fentry%2F2018%2F02%2F27%2F000127&quot; title=&quot;Bashでパイプされたコマンドの出力を変数に割り当て、同時に戻り値を調べる方法 - Going Faraway&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-02-27 00:01:27</published>
  <title>Bashでパイプされたコマンドの出力を変数に割り当て、同時に戻り値を調べる方法</title>
  <type>rich</type>
  <url>https://liaoyuan.hatenablog.jp/entry/2018/02/27/000127</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
