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

fork in unix ?

4 Answers   BFL,


What are awk commands?

0 Answers  


How does the system know where one command ends and another begins?

0 Answers  


which command is used to stop a running process in unix?

8 Answers  


What command will change your prompt to myprompt?

0 Answers  






Can a process kill itself in UNIX/or in its various versions?

2 Answers  


what are the differences between CUI and GUI interfaces?

52 Answers   College School Exams Tests, HCL, HP, IBM, IBMR, NIIT, Talco, Wipro,


What are reported commands?

0 Answers  


What is the search command in unix?

0 Answers  


The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above

4 Answers   IBM,


Why is it called grep?

0 Answers  


What is the nmap command?

0 Answers  


Categories