The basic usage of grep
is for looking for one string in a file, or multiple files, like:
grep '<id>' my_file.xml
but we can also do an OR in the search string:
grep '<id>\|<title>' my_file.xml
Then you will get the lines containing both <id>
and <title>
.