<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mtiit</author_name>
  <author_url>https://blog.hatena.ne.jp/mtiit/</author_url>
  <blog_title>(O+P)ut</blog_title>
  <blog_url>https://www.mtioutput.com/</blog_url>
  <categories>
    <anon>UNIX</anon>
    <anon>UNIX-Linux</anon>
  </categories>
  <description>やりたいこと 以下のようなテキストファイルがあったとして $ cat test.log 20:17:30 20:17:35 20:17:39時刻の差分の秒数を表示したい。 環境情報 GNU bash, version 4.4.12 release (x86_64-unknown-cygwin) やり方 以下で時刻データをUTC形式に変換を行い $ cat test.log | awk '{gsub(/:/, &quot; &quot;, $1); print mktime(&quot;2000 01 01 &quot;$1)}' 946725450 946725455 946725459同データに対して以下を実行すると #!/bin…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mtioutput.com%2Fentry%2Fbash-time-expr&quot; title=&quot;【Bash/Linux】時間分秒の時刻データの差分秒数を取得する - (O+P)ut&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/m/mtiit/20190708/20190708105146.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-10-20 09:31:23</published>
  <title>【Bash/Linux】時間分秒の時刻データの差分秒数を取得する</title>
  <type>rich</type>
  <url>https://www.mtioutput.com/entry/bash-time-expr</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
