<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kaneta1011</author_name>
  <author_url>https://blog.hatena.ne.jp/kaneta1011/</author_url>
  <blog_title>なんかやる</blog_title>
  <blog_url>https://nanka.hateblo.jp/</blog_url>
  <categories>
    <anon>メモ</anon>
    <anon>bash</anon>
  </categories>
  <description>昨日の記事に関連するメモ nanka.hateblo.jp 完全に勘違いしていました。 パイプを繋ぐと左からコマンドが順次実行されるとばかり思い込んでいましたが、並列でそれぞれ動作してるんですね.. 極端なはなしですが↓を実行すると即座に2が出力されて3秒後に1が出力されて終了する $ sleep 3 | (read i; echo '1' 1&gt;&amp;2) | echo '2' 標準入力を受け取るコマンドが正しく動いているのは、入力待ち状態になっているから 上の例で言うと read i がsleep3の出力を待っているので、2 -&gt; 1の順で出力される よくよく考えたらあたり前のことだった.. パ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnanka.hateblo.jp%2Fentry%2F2017%2F04%2F19%2F133053&quot; title=&quot;コマンドをパイプでつなげると並列で動作する - なんかやる&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>2017-04-19 13:30:53</published>
  <title>コマンドをパイプでつなげると並列で動作する</title>
  <type>rich</type>
  <url>https://nanka.hateblo.jp/entry/2017/04/19/133053</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
