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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-02-2011 #1
- Join Date
- May 2011
finding and removing duplicate consecutive words
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