BareGrep

I recently ran across a great tool ( BareGrep ) to perform UNIX-like grep commands in Windows. The more I use the tool, the more I continue to appreciate it.

You can download and use the software for free. If you purchase it, then the nag screen goes away and I think there may be more functionaity.

Anyway, today I was asked to extract all the references to color ( embedded styles and CSS classes ) from our web application. With all the RGB and HEX values dispersed across the site it could have been a tedious daunting task, however, with the help of BareGrep it didn't take very long.

I used BareGrep with the following settings to recursively search our codebase for references to RGB values.


<table width="100%" border="1"><tbody><tr><td> Folder:</td> <td>C:\starteam\myhealthIQ\UserInterface\Web</td></tr><tr><td> Files:</td> <td>..(cs|aspx|html|xsl|js|css|ascx|master)</td></tr><tr><td> Text:</td> <td>((\s\d+,\s\d+,\s\d+\s))</td></tr></tbody></table>
<p>Note: I did another search for HEX values using another regular expression.</p> <p>Once I got the results from the above two searches, I exported the values and ran a BareGrep “Invert Match” search against our standard colors ( example: “(196,\s
38,\s39)|(165,\s176,\s*65)|etc…” ) to isolate any unapproved colors.</p>
I actually came across the above tool while I was looking for a Tail application for Windows and found BareTail. I recommend this tool as well if you need a tool to show the end of a log file in real time.