This channel is intended for users of App::Rak raku.land/zef:lizmat/App::Rak . This channel is being logged, see irclogs.raku.org/raku-rak/live.html
Set by lizmat on 3 November 2023.
07:46 wayland joined
wayland Hi! I'm looking for something that prints all the lines from STDIN until there's a match, and then it prints another say 5 lines, and then exits. 07:47
(I'm wanting to find the first "Not OK" test, and a few lines after) 07:48
I've read about the --also-first option, and it doesn't quite seem to do what I want 07:49
08:27 samebchase left 08:32 samebchase joined 08:45 samebchase left
lizmat hmmm that's not possible with rak at the moment, it would require a new context handler 08:47
wayland Currently using: | perl -pe '/not ok/ and $f=1; $f and do { $f++; $f > 6 and exit; }' 09:22
Anyway, thanks for saving me the trouble of looking further :)
09:34 wayland left 09:45 wayland76 joined
lizmat I guess one could possible want the opposite as well: don't print the lines until there is a match, but then print them all (and possibly N lines before the match) 10:25
wayland76 Yes, agreed; but the X lines before/after is already possible, so it's only the "do/don't print until first/last match" part is needed. 11:03
12:11 wayland joined 12:12 wayland76 left