File | Date | Author | Commit |
---|---|---|---|
src | 2020-12-18 | Miyamoto | [f17d28] Fix compilation with gcc 8.3.0 |
.gitignore | 2020-12-18 | Miyamoto | [0d980b] Git-ignore TODO.md |
CMakeLists.txt | 2020-12-18 | Miyamoto | [bcf9ea] Raise minimum required cmake to 3.13 |
README.md | 2020-12-18 | Miyamoto | [6b5a20] Review README |
build-version.sh | 2014-11-02 | David Voisin | [41e3d9] Script I added to speed up my deployments - Use... |
changelog.md | 2015-01-22 | David Voisin | [6a8f83] Version passes to 1.0.0 as it is considered sta... |
Command line tool to replace strings and chunk of bytes in files.
$ sr [OPTION]... SEARCH REPLACE FILE...
Replace string SEARCH by string REPLACE into the specified file(s).
Use --help option for full options description.
$ sr --help
$ sr Hello Salut hello.txt
Replace strings "Hello" by "Salut" in file hello.txt$ sr Hello '' .
Recursively delete "Hello" strings all files in the current directory$ sr -d Hello '' .
Simulate (dry-run mode) the recursive deletion of strings "Hello" in all files in the current directory$ sr -e '[hH]ello' Salut hello.txt
Replace strings that match regular expression "[hH]ello" by "Salut" in file hello.txt$ sr -U hello.txt
Set file hello.txt endlines into Unix format
Requires cmake and make.
$ mkdir build
$ cd build
$ cmake ..
$ make