I have a file: file.txt, which contains the following data in it.
This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt
My name is not Karl, my name is Karl Joey
What is your name?
Do you know your name and what it is?
When I'm running the following command to get line# of a word "is" in this file using the following command, it's giving me the output like:
$ grep -now "is" file.txt
1:is
is
is
is
is
is
2:is
is
3:is
4:is
What command can I run to get the following output:
1:is
1:is
1:is
1:is
1:is
1:is
2:is
2:is
3:is
4:is
OR
is:1,1,1,1,1
is:2,2
is:3
is:4