Answers for "duplicate a line in linux"

4

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
Posted by: Guest on October-03-2020
1

duplicate file linux

cp file1.txt file1duplicate.txt
Posted by: Guest on August-03-2021

Code answers related to "duplicate a line in linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language