A few months back I was working on a user interface project that had to be cleaned up for production. One of my jobs was to consolidate all the styles into organized style sheets. The application had hundreds of pages several with inline styles. For a quick way to search the html files for inline styles I wrote a regular expression for the grep command. Grep is available on OS X, Linux and UNIX operating systems out of the box. If you are using Windows give Cygwin a try.
1 #!/bin/sh 2 grep -ir "style.*=.*[\"'].*[\"']" *
You can run just the line with the grep statement or include the hash bang line and put it in a shell script like I did so you don’t have to remember it. The r switch tells grep to search recursively.