<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Akiniwa</author_name>
  <author_url>https://blog.hatena.ne.jp/Akiniwa/</author_url>
  <blog_title>忘れないようにメモっとく</blog_title>
  <blog_url>https://akiniwa.hatenablog.jp/</blog_url>
  <categories>
    <anon>awk</anon>
  </categories>
  <description>連想配列のキーにグループの名前を使えばおk。 集計するファイル↓↓ hoge.txt りんご 230 りんご 300 ばなな 190 ばなな 190 みかん 110 りんご 310 ばなな 190 みかん 110 みかん 130 awkファイル↓↓ sum.awk { sum[$1]+=$2 }; END { for (key in sum) { print key, sum[key] } } スクリプトの実行と結果。 awk -f sum.awk hoge.txt ばなな 570 みかん 350 りんご 840</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fakiniwa.hatenablog.jp%2Fentry%2F2014%2F04%2F08%2F220430&quot; title=&quot;awkで列の種類ごとに集計する。 - 忘れないようにメモっとく&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>2014-04-08 22:04:30</published>
  <title>awkで列の種類ごとに集計する。</title>
  <type>rich</type>
  <url>https://akiniwa.hatenablog.jp/entry/2014/04/08/220430</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
