what is the use of uniq commmand?

Answer Posted / giridhar tarare

uniq command search the uniq data in file and if some
duplicate date then it put only single records in report.

For Example: cat testnumber.txt | uniq <enter>

File contents:
1233
456
678
1233
678

output file shows:
1233
456
678

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is grep short for?

749


What does awk stand for?

807


What are the commands in UNIX to list the files in a Directory?

824


How does shebang work?

808


How do you repeat a command in terminal?

846


What is command statement?

794


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1976


What is the use of sed command in unix?

843


What does pipe () return?

780


What is merge command in unix?

1145


Enlist some filename manipulation commands in unix.

760


Write a command that will display files in the current directory, in a colored, long format.

933


Give the command for finding the current date.

769


What is the use of tee command?

776


What is ‘ps’ command for?

858