# replacer
[](<(https://github.com/unfor19/replacer/actions?query=workflow%3Atesting)>)
Find and replace multiline strings
## Requirements
All you need is [Docker](https://docs.docker.com/get-docker/)
## Getting Started
1. Insert a start tag and stop tag to a text file, for example
```html
This is the text block that will be replaced
Let's make it work!
```
2. Prepare a file with the text that you want to inject
```bash
$ echo -e 'This is the incoming text block
\nIt worked!
' > incoming.txt
```
3. Run the application
```bash
$ docker run --rm -v ${PWD}/:/app unfor19/replacer -sf /app/incoming.txt -df /app/README.md
```
4. That's it, your text has been replaced! To see more options
```bash
$ docker run --rm -v ${PWD}/:/app unfor19/replacer --help
Usage: bash main.sh -sf incoming.txt -df README.md
--dst_file_path | -df [REQUIRED] Full path to destination file
--src_file_path | -sf [replacer_null] Full path to source file that will be injected
--src_text | -st [replacer_null] Text of the source to inject
--start_value | -sv [] From where to start
--end_value | -ev [] Where to stop
--create_backup | -cb [true] Create a backup file
--backup_file_path | -bp [./] Full path to backup file
```
_NOTE_: the code block above :point_up: was automatically generated with replacer! See the raw version of this [README.md](https://raw.githubusercontent.com/unfor19/replacer/master/README.md) file and [update_readme.sh](https://github.com/unfor19/replacer/blob/master/scripts/update_readme.sh)
## Authors
Created and maintained by [Meir Gabay](https://github.com/unfor19)
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/unfor19/replacer/blob/master/LICENSE) file for details