<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ke_takahashi</author_name>
  <author_url>https://blog.hatena.ne.jp/ke_takahashi/</author_url>
  <blog_title>memorandums</blog_title>
  <blog_url>https://memorandums.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Rubyでちょっとしたツールを作っていまして、OS種別（LinuxかMacか）で実行できるコマンド（IPアドレスを取得）が異なるのでわけたいなと。 色々調べたものの、なかなか見つからない。ありそうなのに。。。 setコマンドを実行して環境変数を眺めているとOSTYPEってのがそれっぽい。 で、Rubyで実行したもののなぜかnilしか返ってこない。OSTYPEはBASHでセットされる環境変数らしい。。。のでダメなのか？ 諦めかけたときに、たまたまunameコマンドって実行したらOS名（DarwinかLinux）が出てきた。ちなみにLinuxはAWS(Unbuntu)で実行して確認しただけです。 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemorandums.hatenablog.com%2Fentry%2F2023%2F06%2F09%2F130036&quot; title=&quot;RubyでOS種別で処理をわける方法 - memorandums&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>2023-06-09 13:00:36</published>
  <title>RubyでOS種別で処理をわける方法</title>
  <type>rich</type>
  <url>https://memorandums.hatenablog.com/entry/2023/06/09/130036</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
