<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nekoyukimmm</author_name>
  <author_url>https://blog.hatena.ne.jp/nekoyukimmm/</author_url>
  <blog_title>ねこゆきのメモ</blog_title>
  <blog_url>https://nekoyukimmm.hatenablog.com/</blog_url>
  <categories>
    <anon>Bash</anon>
    <anon>zsh</anon>
  </categories>
  <description>シェルShellで変数Variableが定義されているかを判定する方法。 調査した結果、３つの方法があるっぽい。 -v 変数がセットされてるか？ どうか？ -n 変数の長さが0でないNonzero lengthか？ どうか？ -z 変数の長さが0 nzero lengthか？ どうか？ チェックする。 % HAGE=&quot;hage&quot;; [ -v HAGE ]; echo $? 0 % unset HAGE ; [ -v HAGE ]; echo $? 1 % HAGE=&quot;hage&quot;; [ -n &quot;$HAGE&quot; ]; echo $? 0 % unset HAGE ; [ -n &quot;$HAGE&quot; ]; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekoyukimmm.hatenablog.com%2Fentry%2F2018%2F01%2F21%2F101828&quot; title=&quot;&amp;lt;Bash, zsh&amp;gt; シェル変数が定義されているかを判定する方法 - ねこゆきのメモ&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>2018-01-21 10:18:28</published>
  <title>&lt;Bash, zsh&gt; シェル変数が定義されているかを判定する方法</title>
  <type>rich</type>
  <url>https://nekoyukimmm.hatenablog.com/entry/2018/01/21/101828</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
