How to search for 2 patterns and limit them at the same time?
example: I have 50 lines, 25 has "kernel" in it, another 25 has "audit". How can I filter out the output so i get 5 lines of each with a single command? Is it possible with grep?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community