I executed a search with
grep, but it doesn't work like I expected it to. I have the following lines in a file:
blacklists/redirector/domains:needyoutube.com lacklists/redirector/domains:openyoutube.com blacklists/redirector/domains:proxy-youtube.com blacklists/redirector/domains:proxytoyoutube.com blacklists/redirector/domains:streamyoutube.com blacklists/redirector/domains:unblockyoutube.com
When I run:
I get no results. The following works:
How can I escape the colon (
:)? Backslash (grep '\:youtube.com') doesn't work. I use RHEL 5, grep (GNU grep) 2.5.1.
Update: I forgot the entries I wanted to grep, these exist also:
I want to just get the fields that contain the exact domain name. So I want to get the blacklists linked to youtube.com, so I use ":youtube.com".
From the list above (youtube.com, youtube.com.br), I only should get youtube.com, but I don't get anything.
I wasn't clear enough, sorry.