Oh, I understand that you need to grep things. That’s what Perl scripts are for, eh? A Perl script like:
$/ = "%|%" ;
while (<>) {
print $_ if $_ =~ /foo bar buzz/s;
}
and of course, it’s trivial to make a version that takes a cmdline pattern. And compiles that pattern into a thunk before the while-loop.
Again going back to Java, stack-tracebacks are common. When I build large systems in OCaml they’re common also. So grepping isn’t very useful: I don’t want the line containing the pattern I was searching for, but rather the log-record. And as I showed above, it’s pretty trivial to write a script to grep on log-records, not lines.