Created
July 1, 2013 05:53
-
-
Save nise-nabe/5898649 to your computer and use it in GitHub Desktop.
カレントディレクトリ以下のファイルを対象にして第一引き数のものを第二引き数に置換する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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