Horje
bash remove duplicate lines from a file Code Example
bash remove duplicate lines from a file
# Basic syntax:
sort input_file | uniq --unique
# Sort the file first because uniq requires a sorted file to work. Uniq
# then eliminates all duplicated lines in the file, keeping one instance
# of each duplicated line

# Note, this doesn't return only non-duplicated lines. It returns
# unique instances of all lines, whether or not they are duplicated

# Note, if you want to return only one instance of all lines but see
# the number of repetitions for each line, run:
sort input_file | uniq -c




Shell

Related
conda create environment without packages Code Example conda create environment without packages Code Example
migrate specific migration file laravel Code Example migrate specific migration file laravel Code Example
ubuntu iptables open ssh output port Code Example ubuntu iptables open ssh output port Code Example
conda install environment without base packages Code Example conda install environment without base packages Code Example
linux last login Code Example linux last login Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
19