<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mike_neck</author_name>
  <author_url>https://blog.hatena.ne.jp/mike_neck/</author_url>
  <blog_title>mike-neckのブログ</blog_title>
  <blog_url>https://mike-neck.hatenadiary.com/</blog_url>
  <categories>
    <anon>bash</anon>
  </categories>
  <description>Bash で go のテストコードを生成していたら、mac では動くけど、 github actions では動かないテストが出力されていた。 仕方無しに、 set -x をつけて動かしたところ、 (( count++ )) という処理でスクリプトが終了していた。 ということで、以下のコマンドで動作を確認 bash -c ' declare -i count=0 (( count++ )) echo &quot;${?} ${count}&quot; (( count++ )) echo &quot;${?} ${count}&quot; 実行結果は以下の通り。 結果から考えると、以下のような動きをとっていると考えられる (( co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmike-neck.hatenadiary.com%2Fentry%2F2023%2F03%2F20%2F070000&quot; title=&quot;Bash で (( で 0 になっている変数をインクリメントしてたら終了ステータスが 1 になってた - mike-neckのブログ&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/m/mike_neck/20230318/20230318162112.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-03-20 07:00:00</published>
  <title>Bash で (( で 0 になっている変数をインクリメントしてたら終了ステータスが 1 になってた</title>
  <type>rich</type>
  <url>https://mike-neck.hatenadiary.com/entry/2023/03/20/070000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
