DEV Community

Discussion on: Filter Commands in Linux System

Collapse
 
pgronkievitz profile image
Patryk Gronkiewicz

cat logs.txt | grep -ic exceed

You can get rid of cat - you can pass filename directly to the grep as second argument

Collapse
 
yashsugandh profile image
yash sugandh

@Patryk Gronkiewicz Thanks for the suggestion will update one of the examples so everyone can reap the benefits.