#!/bin/tcsh
#
#
##BRIEF
# check textfile for repeated words using grep 
#
##AUTHOR
# Ronni Grapenthin
#
##DATE
# version 2010-06-13
#
##DETAILS
# check textfile for repeated words using grep 
# (blatantly stolen off the web: http://www.codeproject.com/kb/dotnet/RegexTutorial.aspx?fid=136362&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=226)
# gives line number and marks repeated words, doesn't care about cases
#
# USAGE:
#
# usage: check_repeats <text-file>
#
##CHANGELOG
# 2010-06-13, ronni: First version.

echo "Checking for repeated words in file ${1}:"
grep -TEin --color  "\b(\w+)\b\s*\1\b" $1
echo "Done."

#thank you very much!
