I have a problem producing filtering out hanzoMollusc (2)from my grep.
https://node.hanzo.com/production/application/ (1) https://node.hanzoMollusc.com/Messaging/Receiver (2)
My grep command is this for (2) which is working just fine.
/usr/xpg4/bin/grep -E 'node.hanzoMollusc.*Exception' diag* | grep -c 2013-03-28
Problem is if I wanted to search for (1) I need to modify the grep command a bit and use -F where its stated in the manual
"Matches using fixed strings. Treats each pattern specified as a string instead of a regular expression"
This is what I have come up so far... which is not working....
/usr/xpg4/bin/grep -F 'https://node.hanzo.com/application/*Exception' diag* | grep -c 2013-03-28
My problem lies in the domain part which is node.hanzo and node.hanzoMollusc that is why I didn't use -E on (1). Can anyone help me to fix this.
I was able to get what I want exactly with a few tweaks from Gilles example. Actually he was right I tried reading my question and it wasn't clear. My problem boils is this.
I have a problem filtering this
everytime I use this command:
/usr/xpg4/bin/grep -E 'node.hanzoMollusc.*Exception' diag* | grep 2013-03-28
because it also shows up both node.hanzo and node.hanzoMollusc on the results.
I tweaked Gilles example and I was able to get the result right
/usr/xpg4/bin/grep -E '(https://node.hanzo.com/production/application)[/ ].*Exception' diag*
Thanks alot Gilles.