I want to use "awk" or "sed" to print all the lines that start with comm=
from the file filex
, Note that each line contains "comm=somthing"
for example : comm=rm , comm=ll, comm=ls ....
How can i achieve that ?
I want to use "awk" or "sed" to print all the lines that start with comm=
from the file filex
, Note that each line contains "comm=somthing"
for example : comm=rm , comm=ll, comm=ls ....
How can i achieve that ?
For lines that start with
comm=
If
comm=
is anywhere in the line thenHere's an approach using grep:
This treats a word as consisting of alphanumeric characters; extend the character class as needed.
If
grep
is ok to use, you could give a try to:You could use grep also :
this will display all the lines containing
comm=
.