On Tue, 29 May 2012, Jim Meyering wrote: > Running the following command spots over 1500 typos, and suggests fixes: > > $ git ls-files|misspellings -f -|grep -v '^ERROR:'|perl -pe \ > 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/' > k
This command has some bugs in how it produces fixes, fixing them would make the output more useful in some cases: > sed -i '1811s!MISCELANEOUS!Miscellaneous!' gcc/config/mn10300/mn10300.md Should preserve the case of all-uppercase words. > sed -i '2102s!hasnt!hasn't!' gcc/config/picochip/picochip.c Needs to allow for the ' in the replacement string. -- Joseph S. Myers jos...@codesourcery.com