Created
October 26, 2013 11:32
-
-
Save izimbra/7168403 to your computer and use it in GitHub Desktop.
Globally replaces a quoted string (preceded with SOMETHING=) in a file1 using sed. The result is saved in file2. This was tried and worked in OS X 10.9. #sed #osx #shell
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
sed 's/SOMETHING="[^"]*"/SOMETHING="XXX"/g' file1 > file2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment