<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osn_th</author_name>
  <author_url>https://blog.hatena.ne.jp/osn_th/</author_url>
  <blog_title>カタカタブログ</blog_title>
  <blog_url>https://totech.hateblo.jp/</blog_url>
  <categories>
    <anon>Linux</anon>
  </categories>
  <description>いつも作るシェルスクリプトをテンプレート化してみた(オプション、引数チェック)bashでシェルスクリプトを書くと、オプションや引数チェックのロジックはいつもお決まりになるので、今回テンプレート化してみた。オプションと引数を解析して変数に格納、もし想定外のパラメータが入力された場合は使い方を標準エラー出力し、異常終了(exit 1)する、というもの。作ったテンプレートはこちら。template.sh #!/bin/bash # usage cmdname=`basename $0` function usage() { echo &quot;Usage: ${cmdname} [-t] [-f file]…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftotech.hateblo.jp%2Fentry%2F2014%2F12%2F20%2F143206&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>2014-12-20 14:32:06</published>
  <title>いつも作るシェルスクリプトをテンプレート化してみた(オプション、引数チェック)</title>
  <type>rich</type>
  <url>https://totech.hateblo.jp/entry/2014/12/20/143206</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
