py-regex-replace/test/test_multiline_pattern.sh

13 lines
261 B
Bash
Raw Normal View History

2022-06-23 14:50:49 +02:00
#!/usr/bin/env sh
string='alpha = a
beta = b
Exec = foo bar baz
end = EOF'
2022-10-17 22:02:36 +02:00
pattern='= b\nExec ='
repl='='
2022-06-23 14:50:49 +02:00
2022-06-23 23:35:19 +02:00
string="$(printf '%s' "${string}" | ../src/py_regex_replace/main.py -p "${pattern}" -r "${repl}" -c 1)"
2022-06-23 14:50:49 +02:00
printf 'RESULT>>>\n%s\n<<<RESULT\n' "${string}"