Questions tagged [uniq]

uniq is a Unix/POSIX/Linux utility to remove or filter duplicate lines from a sorted file. It is also the name of a method to remove duplicates from an array in Ruby.

uniq is a Unix/POSIX/Linux utility to remove or filter duplicate lines from a sorted file. It is typically applied to the output of sort.

In Ruby , uniq is a method of the Array class to remove duplicates from an array. uniq creates a new array whereas uniq! modifies the array in place.

For questions about unique identifiers, keys, names, etc., see or more specific tags such as , , , , etc.

Documentation

454 questions
-3
votes
1 answer

Perl way of using cut,grep,uniq

I am running a Perl script inside a Perl script, and the output of the script is something like this # aAM axac: cmt /tm9/raaqHRW /myqq1fqq1er/angyvqnqth/rmn/cqqqa/newfqq1er/111111111/ty9a1.1.e.1234567891008547.ahqva # aAM axac: cmt /tm9/raaqHRW…
-3
votes
1 answer

Finding different groups between 0 and 1000 that are in the file

I have a file with 7 fields separated with a :. In field 4 it has the group number. I want to display the group numbers within 0-1000. If there is a duplicate, I only want to print one copy of it along with the other group numbers that don't have a…
E. Reyes
  • 29
  • 1
  • 7
-3
votes
2 answers

How to remove all those extra lines other than columns using sed and uniq, like the result given at the end?

. THE EAST INDIA COMPANY PVT LTD THE EAST INDIA COMPANY PVT LTD Date : 14/03/2016 Time : 12:45:15 …
adam1969in
  • 117
  • 2
  • 9
-3
votes
2 answers

Uniq function in Perl not working

I am using Active Perl 5.20.2. uniq function when applied on an array returns the full array with duplicate values. Please refer to the code below and kindly let know any issues with it or any other way to get the unique values from a list. use…
chint
  • 47
  • 1
  • 8
1 2 3
30
31