Experts:
I don't know that regular expressions will ever be easy for me, so if one of you guru's could help out, I'd appreciate it.
I'm trying to match a line in our syslog, but I can't figure out how to match a number inside a bracket. This is what I'm trying to match.
"Jul 16 00:01:34 webseal1 xinetd[5465]: Reading included configuration file"
This works well enough for me, but doesn't wildcard the PID
egrep -i "xinetd\[5465\]: Reading" filename
This is what I've tried. Obviously I'm not getting it.
egrep -i "xinetd\[\[0-9\]\]: Reading" filename
egrep -i "xinetd\[0-9\]: Reading" filename
egrep -i "xinetd\[[:digit:]\]: Reading" filename
And many other variants. I've done much googling to no avail. Could someone help me out?
Thanks in advance