Add vrep command. - various - Various utilities developed at bitreich.
HTML git clone git://bitreich.org/various/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/various/
DIR Log
DIR Files
DIR Refs
DIR Tags
---
DIR commit 9a3949c788a4072b06ff297ba9d8315f4f1e5106
DIR parent 51e412dc56c90c102187ebbda77a3ce95534aae7
HTML Author: Christoph Lohmann <20h@r-36.net>
Date: Sun, 25 Dec 2022 22:46:05 +0100
Add vrep command.
Diffstat:
A vrep | 10 ++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
---
DIR diff --git a/vrep b/vrep
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s pattern file\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+printf "v/%s/p\nQ\n" "$1" | ed -s "$2"
+