diff options
Diffstat (limited to 'scripts/sh/repl')
-rwxr-xr-x | scripts/sh/repl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/sh/repl b/scripts/sh/repl new file mode 100755 index 0000000..3bd5607 --- /dev/null +++ b/scripts/sh/repl @@ -0,0 +1,8 @@ +#!/bin/sh + +delim_begin="$1" +delim_end="$2" +contents_file="$3" +dest="$4" + +sed -i -ne "/$delim_begin/ {p; r $contents_file" -e ":a; n; /$delim_end/ { p; b}; ba}; p" "$dest" |