- search and replace a string in the current directory
- regular expressions
- rename files and directories
- interactive mode - confirm every replacement and rename
- files ignored by a .gitignore in the working directory are ignorered
go get github.com/holgerk/search-and-replace
cd $GOPATH/src/github.com/holgerk/search-and-replace
go get
go install
Usage:
search-and-replace [OPTIONS] Search Replace
Application Options:
-d, --dry-run Do not change anything
-r, --regexp Treat search string as regular expression
-v, --verbose Show verbose debug information
-i, --interactive Confirm every replacement
Help Options:
-h, --help Show this help message
Arguments:
Search
Replace
match baarfooo and replace with fooobaar
search-and-replace -r "(ba+r)(fo+)" "${2}${1}"
- -ignore files from .gitignore-