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

Write a command to display a file’s contents in various formats?

631


What is unix command?

586


What are reported commands?

570


How to display no of records in oracle using unix command?

591


Does cp command overwrite files?

628






Explain ‘system calls’ with respect to unix commands?

606


Name the general commands in using unix os for a beginner?

628


What is the difference between awk and grep?

561


How do I use grep to search for a file?

584


What is unix command line?

614


How do I use grep to find a file?

583


What happens when we execute a unix command?

602


What is s and g in sed command?

563


How do you grep recursively?

562


What is the use of find command in unix?

588