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

to list a particular line in the file

5 Answers  


What is file system in unix??

10 Answers   Symphony,


How can you see the command line history?

0 Answers  


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

0 Answers  


Assume that a file’s permissions give you read and write access. What operations can you perform on the file if it is in a directory which has “r”(read) only process? What operations can you perform on the file if it is in a directory which has “x”(execute) only access?

1 Answers  






What is updatedb?

0 Answers  


Which is the command used to find out currently executing Process in UNIX?

6 Answers   Amazon,


Name the unix command to find how many days the server has been up.

0 Answers  


distinguish between physical addresses and logical address?

23 Answers   College School Exams Tests, CTS, Infosys, SAX, TATA, TCS,


What is grep command in unix with examples?

0 Answers  


what is the command to find out the difference between files and folders?

6 Answers  


What command is used to replace the existing string with some other?

8 Answers   TCS,


Categories