LoginSignup
11

More than 5 years have passed since last update.

Macであるディレクトリ以下のファイル内の特定文字列を一括置換する方法

Last updated at Posted at 2015-06-19

Linuxサーバ上の時と若干違うので注意

find . -name '*.html' | xargs sed -i "" 's/置換前文文字列/置換後文字列/g'

とすると、カレントディレクトリ以下のhtmlファイルの文字列が置換される。

よく忘れるのでメモ。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11