Hey guys, I'm sure someone will have asked this before but I searched for ages and couldn't find a post.
Anyhow, I have a datafile and I want to search for "UserID : " in it and then return the characters following this until it hits a pipe.
e.g.
Running the comand against the following data:
[01/01/2008] [INFO] |BLAH BLAH|UserID : 12345| RANDOMTEXT
[01/01/2008] |BLAH BLAH|UserID : 54321| RANDOMTEXT | RANDOMTEXT
[INFO] |BLAH BLAH|UserID : 666| RANDOMTEXT
Would return:
12345
54321
666
If any of you have an idea how to do this I would be most grateful. I'm using a Solaris box by the way. Thanks