LoginSignup
37
28

More than 5 years have passed since last update.

git grep した結果を sed で一括置換

Last updated at Posted at 2013-12-12

Mac の場合

全てのファイルから 'ほげ' が含まれるものを探し出し、'ふが' に置換する。

git grep -l 'ほげ' | xargs sed -i '' -e 's/ほげ/ふが/g'

参考

Linux - sed一括置換術(Gitにも対応) - Qiita [キータ]

【Mac】sedコマンドで上書き保存

37
28
1

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
37
28