Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
I’ve been ‘told off’ so many times by the internet for my cat and grep combos that I still do it, then I remove the cat, it still works, and I feel better. shrug
It’s a command line tool which filters for all lines containing the query. So something like
cat log.txt | grep Error5
Would output only lines containing Error5
You can just do
In the back of my mind I know this is there, but the
cat | grep
pattern is just muscle memory at this pointJust remember that if you aren’t actually concatenating files,
cat
is always unnecessary.I’ve been ‘told off’ so many times by the internet for my cat and grep combos that I still do it, then I remove the cat, it still works, and I feel better. shrug
for me as well.
or if its a complex error cat log.txt|grep keyword1|grep keyword 2 and so on.