Shell/Bash: bash only print duplicated lines Example


Shell/Bash Example: This is the "bash only print duplicated lines" Example. compiled from many sources on the internet by

bash only print duplicated lines

# Basic syntax:
sort input_file | uniq -d
# Sort the file first because uniq requires a sorted file to work

# Note, uniq -d only prints one instance of lines that have duplicates
#	Use, uniq -c to count the number of duplicates in the file

* Summary: This "bash only print duplicated lines" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!