From 82abadcecc7534b4847238ee2a977f33256b0439 Mon Sep 17 00:00:00 2001 From: George Abbott Date: Sun, 26 Jan 2025 11:37:22 +0000 Subject: sh --- scripts/sh/repl | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/sh/repl (limited to 'scripts/sh/repl') 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" -- cgit v1.2.1