Skip to content

Commit a3b5274

Browse files
committed
Add example section
1 parent 25a3bef commit a3b5274

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,13 @@ Application Options:
1818
--dry-run dry run mode
1919
-V, --version show version and exit
2020
-h, --help show this help message
21-
```
21+
```
22+
23+
### Examples
24+
25+
| Command | Description |
26+
|-----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
27+
| `goreplace -s foobar -r barfoo file1 file2` | Replaces `foobar` to `barfoo` in file1 and file2 |
28+
| `goreplace --regex -s 'foo.*' -r barfoo file1 file2` | Replaces the regex `foo.*` to `barfoo` in file1 and file2 |
29+
| `goreplace --regex --ignore-case -s 'foo.*' -r barfoo file1 file2` | Replaces the regex `foo.*` (and ignore case) to `barfoo` in file1 and file2 |
30+
| `goreplace --whole-line -s 'foobar' -r barfoo file1 file2` | Replaces all lines with content `foobar` to `barfoo` (whole line) in file1 and file2 |

0 commit comments

Comments
 (0)