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.
Folder: | C:\starteam\myhealthIQ\UserInterface\Web |
Files: | .*\.(cs|aspx|html|xsl|js|css|ascx|master) |
Text: | (\(\s*\d+,\s*\d+,\s*\d+\s*\)) |
Note: I did another search for HEX values using another regular expression.
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,\s*39)|(165,\s*176,\s*65)|etc..." ) to isolate any unapproved colors.
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.