<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ryuichi1208</author_name>
  <author_url>https://blog.hatena.ne.jp/ryuichi1208/</author_url>
  <blog_title>地方エンジニアの学習日記</blog_title>
  <blog_url>https://ryuichi1208.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>x.y.zのコマンドのバージョン比較を行うtips [root@choco01 ~]# gcc -dumpversion 4.8.5 こんな感じのバージョン表示でバージョン次第で動作を分ける処理を書きたいときがあるとしてそのまま数値比較はできない ので、printを使ってフォーマットしてしまう [root@choco01 ~]# gcc -dumpversion | awk -F. '{printf &quot;%2d%02d%02d&quot;, $1,$2,$3}' 40805 数値型にしてしまえばあとは比較は楽なのでifなりで処理を分けることが可能に。 pythonとかだといい感じの比較パッケージがあったり…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryuichi1208.hateblo.jp%2Fentry%2F2020%2F03%2F08%2F164803&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>2020-03-08 16:48:03</published>
  <title>メジャーバージョンーマイナーバージョンリリースバージョンの比較</title>
  <type>rich</type>
  <url>https://ryuichi1208.hateblo.jp/entry/2020/03/08/164803</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
