<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tkuchiki</author_name>
  <author_url>https://blog.hatena.ne.jp/tkuchiki/</author_url>
  <blog_title>tkuchikiの日記</blog_title>
  <blog_url>https://tkuchiki.hatenablog.com/</blog_url>
  <categories>
    <anon>sed</anon>
    <anon>コマンド</anon>
    <anon>Mac</anon>
    <anon>Linux</anon>
  </categories>
  <description>ファイルを一括置換するときに、 find /path/to/dir -type f | xargs sed -i &quot;s/hoge/foobar/g&quot; みたいにコマンドを打つことがあると思いますが、 Macでは、 sed: 1: &quot;/path/to/dir&quot;: invalid command code . や、 sed: 1: &quot;path/to/dir/file&quot;: extra characters at the end of p command のようなエラーが出る。 これは、Mac の sed が BSD のものらしく、GNUのBSD と使い方が若干違うようです。 そのため、GNU の se…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftkuchiki.hatenablog.com%2Fentry%2F2013%2F02%2F27%2F130114&quot; title=&quot;BSD(Mac) で find xargs sed を使う際の注意点 - tkuchikiの日記&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>2013-02-27 13:01:14</published>
  <title>BSD(Mac) で find xargs sed を使う際の注意点</title>
  <type>rich</type>
  <url>https://tkuchiki.hatenablog.com/entry/2013/02/27/130114</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
