<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>program-shoshinsya</author_name>
  <author_url>https://blog.hatena.ne.jp/program-shoshinsya/</author_url>
  <blog_title>auの日記</blog_title>
  <blog_url>https://program-shoshinsya.hatenablog.com/</blog_url>
  <categories>
    <anon>シェルスクリプト</anon>
  </categories>
  <description>auです。シェルスクリプトファイル(sh)でif文を書くときにPythonやCとは何となく違ったのでまとめようと思います。 if文の書き方 基本形 if [ 条件式 ]; then 処理 elif [ 条件式 ]; then 処理 else 処理 fi等しい・等しくない 数値の場合は「-eq, -ne」で、文字列は「=, !=」が正しいようです。 n=1 if [ $n -eq 1 ]; then echo 等しい fi if [ $n -ne 2 ]; then echo 等しくない fiこれよりは例はなく文字で書こうと思います。 LaTeXを書いたことがありますが、その時の数式の記法も同様…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fprogram-shoshinsya.hatenablog.com%2Fentry%2F2020%2F11%2F02%2F230318&quot; title=&quot;シェルスクリプトのif文の書き方 - auの日記&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>2020-11-02 23:03:18</published>
  <title>シェルスクリプトのif文の書き方</title>
  <type>rich</type>
  <url>https://program-shoshinsya.hatenablog.com/entry/2020/11/02/230318</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
