Top "Uniq" questions

uniq is a Unix/POSIX/Linux utility to remove or filter duplicate lines from a sorted file.

how to sort based on a column but uniq based on another column?

He all, I have a file having some columns. I would like to do sort for column 2 then apply uniq …

linux sorting uniq
Can sort | uniq or sort | awk count repeated values from one column?

Using the following data: $cat p1.csv R,3 R,4 S,1 S,2 S,3 R,2 T,4 R,3 ST,4 RST,2 RSTR,4 First sort …

sorting awk uniq
"Illegal Byte sequence" error while using shell commands in mac bash terminal

Getting "illegal byte sequence" error while trying to extract non English characters from a large file in MacOS bash shell. …

bash shell unix sed uniq
bash tail on a live log file, counting uniq lines with same date/time

I'm looking for a good way to tail on a live log file, and display number of lines with the …

bash logging tail uniq
How to delete duplicate lines in a file...AWK, SED, UNIQ not working on my file

I find many ways to do this, AWK, SED, UNIQ, but none of them are working on my file. I …

sed awk duplicates lines uniq
Using linux command "sort -f | uniq -i" together for ignoring case

I am trying to find unique and duplicate data in a list of data with two columns. I really just …

linux sorting awk gawk uniq
Unix uniq, sort & cut command remove duplicate lines

If we have the following result: Operating System,50 Operating System,40 Operating System,30 Operating System,23 Data Structure,87 Data Structure,21 Data Structure,17 …

unix sorting command cut uniq
Changing delimiter of the uniq command

I'd like the output of the uniq command to be comma separated, so that instead of: 30 hello 31 world 36 hey_there 142 …

uniq
Bash- is it possible to use -uniq for only one column of a line?

1.gui Qxx 16 2.gu Qxy 23 3.guT QWS 18 4.gui Qxr 21 i want to sort a file depending a value in the 3rd …

bash sorting uniq
How to sort,uniq and display line that appear more than X times

I have a file like this: 80.13.178.2 80.13.178.2 80.13.178.2 80.13.178.2 80.13.178.1 80.13.178.3 80.13.178.3 80.13.178.3 80.13.178.4 80.13.178.4 80.13.178.7 I need to display unique entries for repeated line (similar to uniq -d) but …

bash sorting uniq