<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mattintosh4</author_name>
  <author_url>https://blog.hatena.ne.jp/mattintosh4/</author_url>
  <blog_title>mattintosh note</blog_title>
  <blog_url>https://mattintosh-note.jp/</blog_url>
  <categories>
    <anon>bash</anon>
    <anon>shellscript</anon>
  </categories>
  <description>Qiita に投稿しようと思ったけどなんか毎回同じようなこと書いてても他の人にはまったく関係ないよねってことでブログに。 また新しい疑問が沸いて来た。 「while read; do :; done &lt; file で何故次の行が読めるのかわからない。」 だって read &lt; file したって1行目しか読まないじゃん？man bash 読んでも「while read の場合は〜」みたいな解説ないじゃん？ とりあえずやってみた。 $ printf &quot;%d 行目\n&quot; {1..10} &gt; file $ exec 3&lt;file $ read -u 3; echo $REPLY 1 行目 $ read…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmattintosh-note.jp%2Fentry%2F2013%2F07%2F19%2F062821&quot; title=&quot;while read で何故次の行が読めるのか - mattintosh note&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>2013-07-19 06:28:21</published>
  <title>while read で何故次の行が読めるのか</title>
  <type>rich</type>
  <url>https://mattintosh-note.jp/entry/2013/07/19/062821</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
