I am having difficulty with pulling just the User Number and the Error form this dataset. Where I am going wrong?
Source data:
[319041185] :: [2013/08/28 08:10:22.702 P2D98 T020 d] PSComAccountsClient.UserPasswordVerify User=6272820002384270, Password=[not logged], AccessLevel=User
.
.
[319041253] :: [2013/08/28 08:10:22.718 P2D98 T020 e] [FunctorBase.Execute] (ErrorCode=Pedi.InternalError) An internal server error occurred. The account could not be found.
Command:
awk "{if (/User=/) {s=$NF; gsub (/[^0-9]/,\"\",s);} if (s==/[0=9]/ && /ErrorCode=/) {q=sub (/.*InternalError\\")"/,\"\"); } printf s; printf q}" file
Current Output:
NULL
Intended Output:
6272820002384270 An internal server error occurred. The account could not be found.