On 02/05/2012 11:47 PM, Jim Meyering wrote:
> What tool do you use for that?

It's a pretty awful script (please see below)
which I originally developed for Emacs.
It has many false positives, and the trick is to
be able to scan its output quickly looking for the real positives.
Perhaps someone someday could take the time to
make it more-generally useful.

export LC_ALL=C
find ${*-*} \
   -type d '(' -name '*-DIC' -o -name '*-dic' -o -name nxml ')' -prune \
   -o -type f \
      ! -name '*~' \
      ! -name 'ChangeLog*' \
      ! -name 'TUTORIAL.??' \
      ! -name 'TUTORIAL.??_*' \
      ! -name 'UnicodeData*.txt' \
      ! -name '*.elc' \
      ! -name '*.ico' \
      ! -name '*.icns' \
      ! -name '*.info' \
      ! -name '*.o' \
      ! -name '*.pdf' \
      ! -name '*.png' \
      ! -name '*.rnc' \
      ! -name '*.tiff' \
      ! -name '*.xpm' \
      ! -name '??-refcard.*' \
      ! -name '??-??-refcard.*' \
      ! -name '??-dired-ref.*' \
      ! -name '??-survival.*' \
      ! -name 'ldefs-boot.el' \
      ! -name 'loaddefs.el' \
      ! -name 'spook.lines' \
      ! -name 'texinfo.tex' \
      ! -name 'uni-name.el' \
      -print0 |
xargs -0 sed '
  s/[^a-zA-Z][^a-zA-Z]*/ /g
  s/\([a-z]\)\([A-Z]\)/\1 \2/g
  y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
' |
aspell list --mode=none |
sort |
uniq -c |
sort -k2n -k1

Reply via email to