Em man grep
:
-h, --no-filename
Suppress the prefixing of filenames on output when multiple files are searched.
Uso:
grep -h 'search term' multiple files
Exemplo:
$ grep network apache2 svnserve sudo
apache2:# Required-Start: $local_fs $remote_fs $network $syslog $named
apache2:# Required-Stop: $local_fs $remote_fs $network $syslog $named
svnserve:# Required-Start: $network $remote_fs $syslog
svnserve:# Required-Stop: $network $remote_fs $syslog
$ grep -h network apache2 svnserve sudo
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog