Return to Snippet

Revision: 82494
at August 10, 2020 12:53 by ferro

Updated URL

Updated Code
find . -name \*.php -exec grep -nHi "PATTERN TO FIND" {} \; | awk -F":" '{gsub(/^\t*/,"",$2);gsub(/ *$/,"",$2);gsub(/^ */,"",$2);printf("%-50s:%s\n", $1, $2);}'

Revision: 55140
at January 28, 2012 00:05 by ferro

Initial Code
find . -name \*.php -exec grep -Hi "PATTERN TO FIND" {} \; | awk -F":" '{gsub(/^\t*/,"",$2);gsub(/ *$/,"",$2);gsub(/^ */,"",$2);printf("%-50s:%s\n", $1, $2);}'

Initial URL

Initial Description
trims spaces from the source code and left align the code column

Initial Title
Find a pattern on a code base and show a pretty resultset

Initial Tags

Initial Language