Skip to content

Instantly share code, notes, and snippets.

@bright23
Last active January 14, 2020 13:12
Show Gist options
  • Save bright23/795173d586a22cd11d1a9e6ad82cd636 to your computer and use it in GitHub Desktop.
Save bright23/795173d586a22cd11d1a9e6ad82cd636 to your computer and use it in GitHub Desktop.
文字列置換
# 単一ファイルから
sed -i -e "s/置換したい文字列/置換後の文字列/g" [置換するファイル]
# プロジェクト全体から
ag -l 置換したい文字列 | xargs sed -i '' -e 's/置換したい文字列/置換後の文字列/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment