Đỗ Chí Hải
New member
How do you grep unique values in Linux?
Answer
Solution:
Answer
Solution:
- Using grep and head command. Pipe the output of grep command to head command to get the first line. …
- Using m option of grep command. The m option can be used to display the number of matching lines. …
- Using the sed command. We can also use the sed command to print unique occurrence of a pattern. …
- Using awk command.