<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rx7</author_name>
  <author_url>https://blog.hatena.ne.jp/rx7/</author_url>
  <blog_title>元RX-7乗りの適当な日々</blog_title>
  <blog_url>https://www.na3.jp/</blog_url>
  <categories>
    <anon>IT</anon>
    <anon>Linux</anon>
  </categories>
  <description>Linuxを使っていて、複数のファイル内に散らばっている、ある文字列を一括して置換する方法。 特定の環境にあわせて、一気に特定のパラメータを書き換えたい場合とか。 $ find . -type f -name '*.html' -print0 | xargs -0 perl -i.bak -pe 's/from/to/g'findとperl＋正規表現で。上の例は、今いるカレントディレクトリ以下の全ての&quot;.html&quot;ファイル内の&quot;from&quot;という文字列を全て&quot;to&quot;に置き換えるワンライナー。 変更が行われたファイルは全て&quot;.bak&quot;という拡張子で元のファイルがバックアップされます。 # ちなみに…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.na3.jp%2Fentry%2F20090207%2Fp2&quot; title=&quot;あるディレクトリ以下の複数ファイル内の文字列を一括で置換するワンライナー - 元RX-7乗りの適当な日々&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.d.st-hatena.com/diary/rx7/2009-02-07.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-02-07 00:00:00</published>
  <title>あるディレクトリ以下の複数ファイル内の文字列を一括で置換するワンライナー</title>
  <type>rich</type>
  <url>https://www.na3.jp/entry/20090207/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
