<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>podhmo</author_name>
  <author_url>https://blog.hatena.ne.jp/podhmo/</author_url>
  <blog_title>podhmo's diary</blog_title>
  <blog_url>https://pod.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>jqfpy</anon>
  </categories>
  <description>以下のような数値が行毎に出力されたファイルがあり。この合計を出す時に 00data.txt 1 2 3 4 5 6 7 8 9 10 (複数の列がある中でcutなどで合計を求めたい列だけを取り出してからのsumの場合もある) 以前までは真面目にpythonのワンライナーを書いていた。他の方法を調べる気も起きなかったので。ちょっと長いし面倒。 $ 00data.txt | python -c 'import sys; print(sum(float(line.strip()) for line in sys.stdin))' 55 JSON 数値もJSONなのでJSONとして扱えば楽だった。jq…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2017%2F09%2F08%2F151323&quot; title=&quot;数値の合計を取るのにJSONとみなせる - podhmo&amp;#39;s diary&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-09-08 15:13:23</published>
  <title>数値の合計を取るのにJSONとみなせる</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2017/09/08/151323</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
