<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>stfuawsc</author_name>
  <author_url>https://blog.hatena.ne.jp/stfuawsc/</author_url>
  <blog_title>苔の一念岩をも通す ~目指せいつかはプログラマ~</blog_title>
  <blog_url>https://stfuawsc.hatenadiary.org/</blog_url>
  <categories>
    <anon>Linux</anon>
    <anon>shell</anon>
  </categories>
  <description>;; これはヨロシクない例 #!/bin/bash arg=$1 if [ $arg = &quot;hoge&quot; ]; then echo $arg fiこの場合、引数が指定されないと$argがNULLなので、こんなメッセージが出る。 unary operator expected ので、&quot;&quot;で囲む事によって比較する型が合わなくなる事を防ぐそうだ。 ;; &quot;&quot;で変数を囲む事 #!/bin/bash arg=$1 if [ &quot;${arg}&quot; = &quot;hoge&quot; ]; then echo $arg fi見事解決。 シェルスクリプトはファイル処理に強いらしい。そうなると文字列処理に強いと言われるPerlにも目が…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fstfuawsc.hatenadiary.org%2Fentry%2F20090526%2F1243354125&quot; title=&quot;シェルスクリプトでの文字列比較 - 苔の一念岩をも通す ~目指せいつかはプログラマ~&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>2009-05-26 01:08:45</published>
  <title>シェルスクリプトでの文字列比較</title>
  <type>rich</type>
  <url>https://stfuawsc.hatenadiary.org/entry/20090526/1243354125</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
