Highlight
Maybe something like this already exists, but I just wrote a quick little script that I call "highlight." It takes one argument, then reads STDIN and highlights that string on output with ANSI coloring (red).
#!/usr/bin/perlSo I can do fun things like:
my $word = shift;
while (<>) {
s/\Q$word\E/\e[31m$word\e[0m/g;
print;
}
% somebigdebuggingoutput | highlight 'what i am looking for'It works great in conjunction with ls, locate, grep, etc.
Leave a comment