<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yamano3201</author_name>
  <author_url>https://blog.hatena.ne.jp/yamano3201/</author_url>
  <blog_title>やーまんぶろぐ</blog_title>
  <blog_url>https://yamano3201.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>文字列マッチする行をカウントする方法をいくつかメモしておきます。以下の内容が書かれたtestファイルからcountという文字列にマッチする行をカウントするという例で書いています。 $ cat test count1 count2 count3 単純にgrepして目で数える場合 マッチする行数だけ知りたい場合 カウント数が期待通りかを戻り値で判定したい場合 カウント数が期待通りかを戻り値で判定しつつ、出力を表示したい場合 おまけ カウントは判定に使うだけで表示させたくない場合 単純にgrepして目で数える場合 (なんかのコマンド) | grep (期待する文字列)ex) $ cat test |…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyamano3201.hatenablog.jp%2Fentry%2F2016%2F09%2F15%2F120817&quot; title=&quot;ワンライナー 文字列マッチする行をカウントする方法 - やーまんぶろぐ&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>2016-09-15 12:08:17</published>
  <title>ワンライナー 文字列マッチする行をカウントする方法</title>
  <type>rich</type>
  <url>https://yamano3201.hatenablog.jp/entry/2016/09/15/120817</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
