<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohei-a</author_name>
  <author_url>https://blog.hatena.ne.jp/yohei-a/</author_url>
  <blog_title>ablog</blog_title>
  <blog_url>https://yohei-a.hatenablog.jp/</blog_url>
  <categories>
    <anon>bash</anon>
  </categories>
  <description>bash の変数展開を使って、FQDN のホスト名（最初のドットより前）の部分だけ取得してみたメモ test.sh #!/usr/bin/bash PG_HOST=${PG_HOST:-redshift-cluster-2.foobar.ap-northeast-1.redshift.amazonaws.com} INSTANCE_IDENTIFIER=${PG_HOST%%.*} echo ${INSTANCE_IDENTIFIER} 実行結果 $ bash test.sh redshift-cluster-2 関連 yoheia/redshift_measuring_query_exec_…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohei-a.hatenablog.jp%2Fentry%2F20211108%2F1636336492&quot; title=&quot;bash の変数展開を使って FQDN のホスト名の部分だけ取得する - ablog&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>2021-11-08 10:54:52</published>
  <title>bash の変数展開を使って FQDN のホスト名の部分だけ取得する</title>
  <type>rich</type>
  <url>https://yohei-a.hatenablog.jp/entry/20211108/1636336492</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
