sr
1.0.0-src
About: sreplace is a command line tool to replace recursively strings in files.
![]() ![]() |
sreplace is command line tool to replace strings in the specified 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. In the root project directory, execute :
$ cmake CMakeLists.txt $ make
The application is based on boost libraries which means the application can compile on most of the operating systems like Linux, BSD, Windows, Mac OS. I actually only compiled for Linux, if requested I can put efforts in compiling for other OS.