From 1852f2d7d63c39d0fd97a2774d1bd16bf53ec67d Mon Sep 17 00:00:00 2001 From: Epoch Qwert Date: Mon, 13 Oct 2014 20:54:28 -0500 Subject: initial commit. collected some tools I had laying around. --- nocompile/XuntilY | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 nocompile/XuntilY (limited to 'nocompile') diff --git a/nocompile/XuntilY b/nocompile/XuntilY new file mode 100755 index 0000000..f6cc672 --- /dev/null +++ b/nocompile/XuntilY @@ -0,0 +1,18 @@ +#!/usr/pkg/bin/perl +$r=$ARGV[0]; +$s=$ARGV[1]; +$m=0; +$count=$ARGV[2]?$ARGV[2]:1; +for(;$l= and $count > 0;) { + if($m == 0) { + if($l =~ $r) { + $m=1; + print $l; + next; + }} + if($m == 1) { + print $l; + if($l =~ $s) { + $m=0; + $count--; +}}} -- cgit v1.2.3