Skip to content

Instantly share code, notes, and snippets.

@nise-nabe
Created July 1, 2013 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nise-nabe/5898649 to your computer and use it in GitHub Desktop.
Save nise-nabe/5898649 to your computer and use it in GitHub Desktop.
カレントディレクトリ以下のファイルを対象にして第一引き数のものを第二引き数に置換する
#!/bin/bash
ack "$1" | sed 's/:..*$//' | while read f; do sed -i "s;$1;$2;" $f; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment