Results 1 to 1 of 1
i have a problem,in my opinion a big one...i want to find and remove duplicate consecutive words from atext file...i've tried working with array but is very difficult..then i've tried ...
- 05-02-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 3
finding and removing duplicate consecutive words
i have a problem,in my opinion a big one...i want to find and remove duplicate consecutive words from atext file...i've tried working with array but is very difficult..then i've tried using sed...somebody hint me with this sed :
sed ':f;N;$!bf; s/\b\(.*\)\n\1\b/\1\n/g; s/\b\(.*\)\b\1\b/\1/g'...it works fine but if i have 3 consecutive identical words it only remove firts one and the last two remain intacts...any suggestions?pls help me
thanks


Reply With Quote