[Grml] nifty little tool -- histring
T
mlist4suntong at yahoo.com
Sun Nov 12 06:10:09 CET 2006
[instigated by the fact that aamath was newly added to grml repository]
Hi,
Like to work in console more than X?
Like text tools more than GUI ones?
Then this small tools is definitely for you -- histring.
http://www.kw.kernel.org/pub/mirrors/freebsd/ncvs/ports/misc/histring/
histring simply highlights strings using ANSI terminal escape codes.
but the usage is endless.
I almost use it everywhere in my script where I need a quick peek into large
output. For example,
zip -t *.zip 2>&1 | histring -fEi 'warning |bad CRC|error: ' | less
will tell me if any of the zips files has any problem.
Once you get used to it, you can't image the life without it.
The following is another nifty alias that I use more often than anything
else, to accept output from diff or rcsdiff to highlight diffs.
histring -fE '^Comparing files .*|^diff .*' | histring -c yellow -fE '^\-.*' | histring -c green -fE '^\+.*'
With that, who needs to wait for 0.5s for tkdiff? :-)
Also, with that I wrote another alias to compare rcs file version by version.
I guess no other diffing tool have such ability to show how things evolve.
Hope we can have that in grml repository soon...
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/
More information about the Grml
mailing list