<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hymd3a</author_name>
  <author_url>https://blog.hatena.ne.jp/hymd3a/</author_url>
  <blog_title>ひゃまだのblog</blog_title>
  <blog_url>https://hymd3a.hatenablog.com/</blog_url>
  <categories>
    <anon>Bash</anon>
    <anon>Linux</anon>
  </categories>
  <description>(2024-02-11 初稿) Bashの while と for を利用していて、どうしてそのような仕様になっているのか、不思議なので記事にしてみた。 まずは、whileを使った無限ループは、以下のとおり。 なお、無限ループを抜けるのは、Ctrl+c(コントロールとcを同時に押す)で終わってね。 $ while true; do echo &quot;test&quot;; sleep 1; done test test ^C 一方、 for を使った無限ループは、以下のとおり。 $ for ((;;)); do echo &quot;test&quot;; sleep 1; done test test ^C while、for…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhymd3a.hatenablog.com%2Fentry%2F2024%2F02%2F11%2F190541&quot; title=&quot;Bashのwhileとforの無限ループと{}(ブレース)への対応について - ひゃまだのblog&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.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-02-11 19:05:41</published>
  <title>Bashのwhileとforの無限ループと{}(ブレース)への対応について</title>
  <type>rich</type>
  <url>https://hymd3a.hatenablog.com/entry/2024/02/11/190541</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
