Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by geek-university.com #
 
PREVIOUS NEXT
Tagged: #bash #print #duplicated #lines
ADD COMMENT
Topic
Name
2+8 =