<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>minion024</author_name>
  <author_url>https://blog.hatena.ne.jp/minion024/</author_url>
  <blog_title>How to make datas our friends</blog_title>
  <blog_url>https://024minion.hatenablog.jp/</blog_url>
  <categories>
    <anon>Shell</anon>
    <anon>SQL</anon>
  </categories>
  <description>概要 ShellScriptをかきかきしていたときに、MySQLの実行結果（今回は数字）をShellの変数に代入して使用したいタイミングがあり、どうやって実現したのか備忘録。 ▼こうゆうことをやりたい。 # MySQLを実行して mysql -uroot -e &quot;SELECT SUM(hoge) FROM fuga.table;&quot; # この変数に実行結果を入れたい！！ RESULT = MySQL実行結果 解決方法 # MySQLを実行 MYSQLRES=`mysql -uroot -e &quot;SELECT CONCAT('RESULT=', SUM(hoge)) AS 'id0=0' FROM …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2F024minion.hatenablog.jp%2Fentry%2F2017%2F07%2F15%2F214728&quot; title=&quot;ShellScriptでMySQLの実行結果を変数にぶち込む - How to make datas our friends&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-07-15 21:47:28</published>
  <title>ShellScriptでMySQLの実行結果を変数にぶち込む</title>
  <type>rich</type>
  <url>https://024minion.hatenablog.jp/entry/2017/07/15/214728</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
