/ Published in: Bash

trims spaces from the source code and left align the code column
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
find . -name \*.php -exec grep -nHi "PATTERN TO FIND" {} \; | awk -F":" '{gsub(/^\t*/,"",$2);gsub(/ *$/,"",$2);gsub(/^ */,"",$2);printf("%-50s:%s\n", $1, $2);}'
Comments
