Created
April 11, 2014 16:46
-
-
Save sankars/10483390 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # http://stackoverflow.com/questions/471183/linux-command-line-global-search-and-replace | |
| # not recursive. input the file name | |
| sed -i 's/foo/bar/g' * | |
| # recursive | |
| find -name '*.html' -print -exec sed -i.bak 's/foo/bar/g' {} \; | |
| ## http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-in-linux | |
| grep -Rl "CR1" /appl ## R-recursive l-filename | |
| grep -Rnw /appl -e 'CR1' ## n-line number w-word | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment