<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>akihiro_ob</author_name>
  <author_url>https://blog.hatena.ne.jp/akihiro_ob/</author_url>
  <blog_title>akihiro_obの日記</blog_title>
  <blog_url>https://akihiro-ob.hatenadiary.org/</blog_url>
  <categories>
    <anon>備忘録</anon>
    <anon>sh</anon>
  </categories>
  <description>シェルで正規表現を使って引数の値とかチェックしたい。 一度やって忘れてたので記録しておく。 bashの場合 bashさんは正規表現比較方法があるので楽ちん if [[ &quot;$INPUT&quot; =~ ^[0-9]+$ ]]; then echo 'number!!'; fi bashさんかわいいよbashさん shの場合 基本的にbashは入ってるのでbashでいいと思うんだけど、 お作法的にshで書くことになってるとも思う もう古い考えな気がしないでもないけどshはbashのようにできない臭いのでexprでやってたっぽい if [ `expr &quot;$INPUT&quot; : &quot;^[0-9]*$&quot;` -gt 0…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fakihiro-ob.hatenadiary.org%2Fentry%2F20130209%2F1361808396&quot; title=&quot;シェルでの正規表現比較 - akihiro_obの日記&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>2013-02-09 01:06:36</published>
  <title>シェルでの正規表現比較</title>
  <type>rich</type>
  <url>https://akihiro-ob.hatenadiary.org/entry/20130209/1361808396</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
