Answer by user1754566 for Command line method to find repeat-word typos, with...
As an addenum to vonbrand's answer re: the command line tool 'diction'If you'd like to search for duplicate words only and turn off the other style elements, you can do something like this:diction -n...
View ArticleAnswer by snth for Command line method to find repeat-word typos, with line...
Since you tagged this question with awk, why not just use awk?$ awk ' BEGIN{RS=FS="\\W+"} $0==t{printf("%s:%s\t%s %s\n", FILENAME, FNR, t, $0)} {t=$0}' *.txthighlander_typo.txt:6 one...
View ArticleAnswer by vonbrand for Command line method to find repeat-word typos, with...
You should take a peek at the venerable diction(1) and style(1) commands. They catch a variety of boo-boos. There are newish versions (GPLv3 here on Fedora 23).InstallFor example on Debian-based...
View ArticleAnswer by jimmij for Command line method to find repeat-word typos, with line...
Edited: added install and demoYou need to take care of at least some edge cases, likerepeated words at the end (and beginning) of the line.search should be case insensitive, because of frequent errors...
View ArticleAnswer by glenn jackman for Command line method to find repeat-word typos,...
This will print lines (with filename and line number) with repeated words:for f in *.txt; do perl -ne 'print "$ARGV: $.: $_" if /\b(\w+)\W+\1/'"$f"doneFor multi-line matching there's this, but you lose...
View ArticleAnswer by user732 for Command line method to find repeat-word typos, with...
Here's what I ended up with:tr '[:space:]''\n'< highlander_typo.txt | tr -d '[:punct:]' |tr '[:upper:]''[:lower:]' | uniq -DI believe that's GNU tr syntax.
View ArticleCommand line method to find repeat-word typos, with line numbers
Updated: Clarify line number requirement, some verbosity reductionsFrom the command line, is there a way to:check a file of English textto find repeat-word typos,along with line numbers where they are...
View Article
More Pages to Explore .....