Skip to content

Instantly share code, notes, and snippets.

@rac021
Last active October 29, 2017 20:50
Show Gist options
  • Save rac021/d88e5080fbc1d1daf1afd60ca262665d to your computer and use it in GitHub Desktop.
Save rac021/d88e5080fbc1d1daf1afd60ca262665d to your computer and use it in GitHub Desktop.
Display Only Duplicate lines using Bash :
1) On specifi column : cat *.* | cut -f 2 -d\ | sort | uniq -d
2) All row : cat *.* | sort | uniq -d
Delete duplicate rows and copy them to different files with a size limit
1) awk '!seen[$0]++' *.* | split --additional-suffix=.ttl -d -l 1000 - yedG_
2) gawk -i inplace '!a[$0]++' *.* & find . -size 0 -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment