Thanks for the replies.
Sorry, but your solution did not work; as far as I understand regexps, the '^' in your code indicates beginning of line
and not invert result
. I might be wrong but I think that that's why it did not work.
That did the trick.
nilesh' answer however triggered another question.
The man pages state that egrep
and grep -e
are the same. I however can not figure out how that is the case. From the below, I understand that egrep is a link to another egrep which in turn is a link to grep. Nowhere the -e option is passed which makes me wonder if -e is not the default behaviour of grep.
wim@lbtd-techweb01:~$ ls -l /usr/bin/egrep
lrwxrwxrwx 1 root root 15 2007-09-19 09:37 /usr/bin/egrep -> ../../bin/egrep*
wim@lbtd-techweb01:~$ ls -l /bin/egrep
lrwxrwxrwx 1 root root 4 2007-09-19 09:37 /bin/egrep -> grep*
wim@lbtd-techweb01:~$ ls -l /bin/grep
-rwxr-xr-x 1 root root 129768 2006-08-07 02:53 /bin/grep*