Grep multiple fields large file
by bishop2001 from LinuxQuestions.org on (#6HQNN)
Greetings
I have a huge file that I'm trying to extract a few fields from followed by a value. For example the file looks like this but huge, but the pattern is the same
$_h7e 6ijrn3ij exceed: 8686738, string ABC/#123/in4j([99, fieldA
I want to extract all matches and display like:
exceed: 8686738, string ABC/#123/in4j([99,
exceed: 683738, string #Pheu/GP/i972j(3i,
Etc...
I'm trying regex like,
egrep -o "exceed: [0-9]*|string *,"
I'm matching exceed: and the numeric value, but not the field string and up until the comma. Suggestions please
Thanks again
I have a huge file that I'm trying to extract a few fields from followed by a value. For example the file looks like this but huge, but the pattern is the same
$_h7e 6ijrn3ij exceed: 8686738, string ABC/#123/in4j([99, fieldA
I want to extract all matches and display like:
exceed: 8686738, string ABC/#123/in4j([99,
exceed: 683738, string #Pheu/GP/i972j(3i,
Etc...
I'm trying regex like,
egrep -o "exceed: [0-9]*|string *,"
I'm matching exceed: and the numeric value, but not the field string and up until the comma. Suggestions please
Thanks again