<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>keisukefukuda</author_name>
  <author_url>https://blog.hatena.ne.jp/keisukefukuda/</author_url>
  <blog_title>本当は怖いHPC &amp; AI</blog_title>
  <blog_url>https://freak-da.hatenablog.com/</blog_url>
  <categories>
    <anon>sh</anon>
    <anon>bash</anon>
  </categories>
  <description>自動化のためのシェルスクリプトを書いていると，いろんな操作でディレクトリ名を連結してパスを作った際に&quot;path/to/../my/../../nice/directory&quot; みたいな感じになってしまうことがある．これはちょっとカッコ悪いし不便なので，これを正規化する（単純には &quot;..&quot; を取り除く） 方法は無いかなぁと思っていた．なぜ今まで気づかなかったのか不思議だが， http://stackoverflow.com/questions/284662/how-do-you-normalize-a-file-path-in-bash にまんまの答えがあったのでメモがてら紹介．きっと知っている人…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffreak-da.hatenablog.com%2Fentry%2F20121023%2Fp1&quot; title=&quot; シェルスクリプトで &amp;quot;..&amp;quot; とかを含んだパスを正規化する方法 - 本当は怖いHPC &amp;amp; AI&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>2012-10-23 00:00:00</published>
  <title> シェルスクリプトで &quot;..&quot; とかを含んだパスを正規化する方法</title>
  <type>rich</type>
  <url>https://freak-da.hatenablog.com/entry/20121023/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
