Write a command that will output the sorted contents of a file named in.txt and place the output in another file named out.txt, while at the same time excluding duplicate entries.



Write a command that will output the sorted contents of a file named in.txt and place the output in ..

Answer / marigold

sort in.txt | uniq - d > out.txt

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Unix Commands Interview Questions

How to get a particular string as your prompt ? Give syntax of that command?

3 Answers  


How to check the flavor of UNIX?

8 Answers   HCL, Syntel,


What are the general commands in using unix os for a beginner?

0 Answers  


How do I use grep to find a file?

0 Answers  


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

0 Answers  


By using which command we can find the CPU utilization time?

7 Answers   Amazon,


how many internal commands is there in UNIX?

3 Answers   TCS, Virtusa,


What is the size of time_t?

0 Answers  


What is “chmod” command?

0 Answers  


what is the function of grep command?

4 Answers  


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

0 Answers  


What is the behavioural difference between cmp and diff commands?

0 Answers  


Categories