<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>HK29</author_name>
  <author_url>https://blog.hatena.ne.jp/HK29/</author_url>
  <blog_title>PythonとVBAで世の中を便利にする</blog_title>
  <blog_url>https://hk29.hatenablog.jp/</blog_url>
  <categories>
    <anon>Linux</anon>
    <anon>Shell</anon>
    <anon>抽出</anon>
  </categories>
  <description>本記事では、例えば、data_12.csvの文字列変数に対して、6番目から2つまでの文字列12を抽出する雛形コードを載せました。下図はその結果例です。12を抜き出して、拡張子に.txtをしてシンボリックリンクを貼っています。 ■本プログラム #!bin/bash my_file=&quot;data_12.csv&quot; # my_fileの頭から6番目から2つまでを取得する場合 echo ${my_file:5:2} # 拡張子を.txtにして、シンボリックリンク（ショートカット）を貼る ln -s ${my_file} ${my_file:5:2}.txt ※Bad substitution というエラー…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhk29.hatenablog.jp%2Fentry%2F2021%2F12%2F11%2F204947&quot; title=&quot;Bash 変数から指定範囲の文字列を抜き出す - PythonとVBAで世の中を便利にする&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>https://cdn-ak.f.st-hatena.com/images/fotolife/H/HK29/20211211/20211211203018.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-12-11 20:49:47</published>
  <title>Bash 変数から指定範囲の文字列を抜き出す</title>
  <type>rich</type>
  <url>https://hk29.hatenablog.jp/entry/2021/12/11/204947</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
