what is the use of uniq commmand?

Answer Posted / rhino

Small correction to Answer #3 If the line is repeated in
the very next line it will be removed , Else this will be
displayed as if it is a new number

Ex. as below -- This has been cross checked before answering


Ex : File duplitest has below lines

RohiBaby
RohiBaby
GunduBaby
ChinniBaby
RohiBaby
Rohith

cmd. : cat duplitest | uniq -- Gives below o/p

RohiBaby
GunduBaby
ChinniBaby
RohiBaby
Rohith

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the command to view process running?

568


Explain how to use grep command to list find the records of a file containing 10 different strings?

588


How do you repeat a command in terminal?

587


What is the unix command to confirm a remote host is alive or not?

574


What does grep v grep do?

546






What is the use of the command 'ls -x chapter[1-5]' ?

658


Enumerate some of the most commonly used network commands in unix?

612


What is the use of sed command in unix?

587


What is awk good for?

578


What will the following command do?

607


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

949


Enlist some filename manipulation commands in unix.

544


What are grep patterns?

572


What is the nmap command?

575


What is {} in find command?

575