histring – highlight strings using ANSI terminal escape sequences


histring [ options ] <pattern> [file]...


This manual page documents briefly the histring command.

histring is a program that highlights strings using ANSI terminal escape codes.


histring supports the following options:

--help Show summary of options.
       Show version of program.
-c, --color <name|number>
       Color to highlight in.
-s, --style <name>
       Style to apply to highlight, if any styles  are  used  then  the
       color will not be implicitly bolded, you must bold it your self.
-E, --extended
       Use extended regular expressions.
-f, --force
       Force hilighting even if stdout is not a tty.
-i, --ignore-case
       Ignore case distinctions.
       Print debugging info.
       Print the credits and exit.


Highlight warnings and errors when testing the integrity of zipfiles:

zip -T *.zip 2>&1 | histring -fEi 'warning |bad CRC|error: '

Highlight interesting stuff from diff output:

hg diff | histring -fE '^Comparing files .*|^diff  .*'  |  histring  -c
yellow -fE '^-.*' | histring -c green -fE '^+.*'



Also, my blog about histring versatile usage examples.


histring was written by Angus Mackay <amackay@gusnet.cx>.

This manual page was written by Michael Prokop <mika@grml.org> for the grml project (but may be used by others).

One thought on “histring

  1. Pingback: Highlighting strings in text output with histring | SF-Xpt's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s