<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>coffee_kabu</author_name>
  <author_url>https://blog.hatena.ne.jp/coffee_kabu/</author_url>
  <blog_title>Bus errorとSegmentation faultに困ったら見るブログ</blog_title>
  <blog_url>https://coffee-guhaw.hateblo.jp/</blog_url>
  <categories>
    <anon>シェルコマンド/シェルスクリプト</anon>
  </categories>
  <description>■ 参考 : シェルスクリプトでコマンドの有無を確かめるif [ `which hoge` ]; then echo 'hoge atta' fi自分も最初にwhichとifでどうにかなりそう・・・と思ったけど、if文の書き方がわからなくてググった・・・ シェルスクリプトのifはこんなに使っても全然覚えられない・・・ testとifと[ ]があって頭グチャグチャwhichの代わりに、hashやtypeというコマンドに置き換えても動くしそっちの方が早いという記事もあって試してみた■ 参考 : Bashでコマンドの存在チェックif type &quot;hoge&quot; &gt; /dev/null 2&gt;&amp;1 then…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcoffee-guhaw.hateblo.jp%2Fentry%2F2025%2F04%2F24%2F120000&quot; title=&quot;【シェルスクリプト】内であるコマンドの有無を判別 - Bus errorとSegmentation faultに困ったら見るブログ&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>2025-04-24 12:00:00</published>
  <title>【シェルスクリプト】内であるコマンドの有無を判別</title>
  <type>rich</type>
  <url>https://coffee-guhaw.hateblo.jp/entry/2025/04/24/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
