I am using Ubuntu 16.04.
I want to search for a certain word, but I also want the whole file that contains the word to be outputted on the terminal so that I can see where in the file the word is located. However, when I use grep
, it will only show the particular sentence that contains the word, not the whole file.
What command can I use to search for a word but also show the whole file along with the place where the word is located?