histring – highlight strings using ANSI terminal escape sequences
Thanks to ‘T’ for pointing to histring on the grml user mailinglist. histring simply highlights strings using ANSI terminal escape codes. It is very useful e.g. for parsing output of grep and diff. I really like the tool because it simplifies recognition of important patterns to me. I use it for example in highlighting important stuff inside diff output as suggested by T:
% which hidiff hidiff: aliased to histring -fE '^Comparing files .*|^diff .*' | histring -c yellow -fE '^\-.*' | histring -c green -fE '^\+.*'
See it in action:
The project’s homepage isn’t available, but I managed to built a Debian package using the archived sources from BSD ports. As usual get the .deb via the grml repository.
Oh, and grml 0.9 will ship the hidiff alias as well. ;-) If you have other useful aliases you would like to see in grml please let me know.
November 26th, 2006 at 15:36
Thats pretty nice!