go-replace: golang 的一个替换命令行
golang 实现的一个替换命令行工具
🕐
安装
# 下载好,手动安装
cd ~/Downloads
ins go-replace.darwin.amd64 go-replace
$ go-replace -h常用
| Command | Description |
|---|---|
| Replaces foobar to barfoo in file1 and file2 |
| Replaces the regex foo.* to barfoo in file1 and file2 |
| Replaces the regex foo.* (and ignore case) to barfoo in file1 and file2 |
| Replaces all lines with content foobar to barfoo (whole line) in file1 and file2 |
| Replaces all lines with content foobar to barfoo (whole line) in *.txt files in current path |