Archive for the ‘Unix’ Category

Find Occurences of Text String in Files

Tuesday, June 17th, 2008 by Jesper Rønn-Jensen

I had to search for occurences of string in particular files, and using Cygwin i did the following: find all files that ends on .js, .html or .ascx: $ find -regextype posix-extended -regex “.+\.(js|html?|ascx)$” Then search for lines that contain the following javascript construction for( var x in object) I ended up with this regular […]