Which option is used with uniq command for selecting non-repeated lines?

KellyPoima

New member
Which option is used with uniq command for selecting non-repeated lines?
A. -i
B. -c
C. -u
D. -a
 
Answer: c
Explanation: To select unique lines, we can use the sort -u command. But uniq also offers an option (-u) which is used for selecting non-repeating entries in a field. For example,
Code:
$ cut  -d  “|” -f3 emp.lst | sort  |uniq -u   
 // cut 3rd field from emp.lst, sort it and find unique entries
 

Tìm kiếm

Back
Top