I want to use grep --color -E '^|pattern1|pattern2' file name
for highlight parts of my file, but patterns are in another files. for example:
base file:
#!/usr/bin/env
<?php
include 'second.php';
function saybye()
{
return "bye";
}
echo "<br />";
function sayHello() {
return "hellobye";
}
?>
pattern file:
#!/usr/bin/env
<?php
include 'second.php';
function saybye()
{
return "bye";
}
echo "<br />";
?>
I want to highlight parts of base file that exact match with pattern file.
also I want to highlight lines with different colors. how can I do this?
thanks for any help.