I am using "sed" to find and delete a phrase in a text file. It works great, but I can't seem to make it get specific. For example, this is my "sed" command:
sed -i 's/foobox.com//' ~/Foo/fooman.txt
I am looking for 6 specific phrases in ~/Foo/fooman.txt
dl-web.foobox.com dl.foobox.com foobox.com fooboxdownloads.com www.foobox.com www.fooboxdownloads.com
When I run
sed -i 's/foobox.com//' ~/Foo/fooman.txt it finds every enty with "foobox.com" and deletes it, but leaves the left overs there (i.e. "dl-web."
"dl." "downloads.com" "www." "www.downloads.com".
Can I make "sed" use a "wildcard" when searching for the phrase? If so, where does one put the wildcard (I have already tried (*) which does not work). If not using a wildcard, can "sed" use some other method to get specific (dl-web.foobox.com) instead of just being general (foobox.com)? id "sed" can't do the trick, is there a nother CI command that would do the trick?
Thanks for any help, I am new to Linux and writing CI commands.