_____ option is used with sort command for removing repeated lines.

Answer: b
Explanation: sort provides an option i.e. -u (unique) which lets us remove repeated lines from a file. We can use this option with sort command to find unique occurrences in the file. For example,
Code:
$ cut -d “|” -f3 emp.lst | sort  -u | tee design.lst
Above command will cut out the designation field from emp.lst, after that the output will be piped to sort command to find out the unique designations in the file. The output produced will be like:
Chairman
d.g.m
director
executive
g.m. 
manager
 

Tìm kiếm

Back
Top