<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mtiit</author_name>
  <author_url>https://blog.hatena.ne.jp/mtiit/</author_url>
  <blog_title>(O+P)ut</blog_title>
  <blog_url>https://www.mtioutput.com/</blog_url>
  <categories>
    <anon>UNIX</anon>
    <anon>UNIX-Linux</anon>
  </categories>
  <description>文字列から半角英数のみ取り出すワンライナー hoge.txtに複数行の文字列が書かれているとして、半角英数のみ取り出したければ以下のコマンドコピペで動作します。 cat hoge.txt | sed -e 's/[^abcdefghihklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890]//g' | grep -v '^\s*$' 解説 cat hoge.txt これはhoge.txtの中身を表示するおなじみのコマンドです。 sed -e 's/[^a...]//g' 文字列の変換処理を行うために-eオプションを指定します。 変換内容として…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mtioutput.com%2Fentry%2F2018%2F12%2F13%2F220000&quot; title=&quot;【sedコマンド】文字列から半角英数のみ取り出す - (O+P)ut&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>https://cdn-ak.f.st-hatena.com/images/fotolife/m/mtiit/20190708/20190708105146.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-12-13 22:00:00</published>
  <title>【sedコマンド】文字列から半角英数のみ取り出す</title>
  <type>rich</type>
  <url>https://www.mtioutput.com/entry/2018/12/13/220000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
