<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kagasu</author_name>
  <author_url>https://blog.hatena.ne.jp/kagasu/</author_url>
  <blog_title>備忘録</blog_title>
  <blog_url>https://kagasu.hatenablog.com/</blog_url>
  <categories>
    <anon>Linux</anon>
    <anon>bash</anon>
  </categories>
  <description>Ⅰ. はじめに bashの変数は全てを文字列として扱う為、そのままでは数値計算ができません。 数値計算を行う方法として以下の3通りあります。 # 概要 1 $(())を使う方法 2 exprを使う方法 3 bcを使う方法 Ⅱ. $(())を使う方法 $ echo $((10+10)) 20 Ⅲ. exprを使う方法 $ echo `expr 10 \+ 10` 20※ \を使う理由は、構文エラーをさける為です。 10 * 10の掛け算（ダメな例） $ echo `expr 10 * 10` expr: 構文エラー 10 * 10の掛け算（正しい例） $ echo `expr 10 \* 10`…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagasu.hatenablog.com%2Fentry%2F2017%2F11%2F13%2F160045&quot; title=&quot;bashで文字列を数値に変換して数値計算する方法 - 備忘録&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>2017-11-13 16:00:45</published>
  <title>bashで文字列を数値に変換して数値計算する方法</title>
  <type>rich</type>
  <url>https://kagasu.hatenablog.com/entry/2017/11/13/160045</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
