remove consecutive duplicate rows | Unix Linux Forums | Shell Programming and Scripting
www.unix.com
Make all lines uniq (make duplicate consecutive line appear only once):
Code:
awk '{sub(".*"$2,$2)}1' yourfile | uniq
#grep #cli #commands #dev #scripting #utilities #text_manipulation #tidbits #discussions #issues #awk #pub
Collect and share the web
Get started for free