<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>biibiebi</author_name>
  <author_url>https://blog.hatena.ne.jp/biibiebi/</author_url>
  <blog_title>何でも屋エンジニアのブログ</blog_title>
  <blog_url>https://blog.ebihara99999.com/</blog_url>
  <categories>
  </categories>
  <description>シェル変数の末尾の文字を削除する シェルスクリプトを書く際、変数の末尾についた余分な記号を取りたいとき、以下のように行っていた（以下、&quot;bananapencilbook&quot;という文字列から&quot;book&quot;を削除する）。OSはCentOS、シェルはbashです。 $ echo ${testvar} bananapencilbook $ echo ${testvar} | sed -e 's/book$//g' bananapencil 上の方法は末尾の文字列以外にも適用できるので楽なのだが、他に何かないか探していたところ、 同じことが以下のようにできるらしい。 $ echo ${testvar%boo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.ebihara99999.com%2Fentry%2F2015%2F04%2F21%2F230601&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>2015-04-21 23:06:01</published>
  <title>シェル変数の末尾の文字を削除する</title>
  <type>rich</type>
  <url>https://blog.ebihara99999.com/entry/2015/04/21/230601</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
