brew install gnu-sed Replace \t with 2 spaces find app/{controllers,models,views} db/ lib/ -type f -exec gsed -b -i 's/\t/ /g' {} \;