Hi,
I am new to unix scripting and need help for the following question. Any kind of help is appreciated.
The file I have is of the following format.
GROUP_FIELD_NAME
ocumentNumber
GROUP_FIELD_VALUE:1
GROUP_FIELD_NAME
olicyNumber
GROUP_FIELD_VALUE:295
GROUP_FIELD_NAME:AccountNumber
GROUP_FIELD_VALUE:500
GROUP_FIELD_NAME
ocumentNumber
GROUP_FIELD_VALUE:2
GROUP_FIELD_NAME
olicyNumber
GROUP_FIELD_VALUE:4456
GROUP_FIELD_NAME:AccountNumber
GROUP_FIELD_VALUE:5001
.
.
.
GROUP_FIELD_NAME
ocumentNumber
GROUP_FIELD_VALUE:109
GROUP_FIELD_NAME
olicyNumber
GROUP_FIELD_VALUE:29
GROUP_FIELD_NAME:AccountNumber
GROUP_FIELD_VALUE:5013
I need the last Field_value of the Field_Name DocumentNumber. In this case it is 109. This is the only value I need from the Input file.
Any solution how I can code it?
Thanks in advance.
I am new to unix scripting and need help for the following question. Any kind of help is appreciated.
The file I have is of the following format.
GROUP_FIELD_NAME
GROUP_FIELD_VALUE:1
GROUP_FIELD_NAME
GROUP_FIELD_VALUE:295
GROUP_FIELD_NAME:AccountNumber
GROUP_FIELD_VALUE:500
GROUP_FIELD_NAME
GROUP_FIELD_VALUE:2
GROUP_FIELD_NAME
GROUP_FIELD_VALUE:4456
GROUP_FIELD_NAME:AccountNumber
GROUP_FIELD_VALUE:5001
.
.
.
GROUP_FIELD_NAME
GROUP_FIELD_VALUE:109
GROUP_FIELD_NAME
GROUP_FIELD_VALUE:29
GROUP_FIELD_NAME:AccountNumber
GROUP_FIELD_VALUE:5013
I need the last Field_value of the Field_Name DocumentNumber. In this case it is 109. This is the only value I need from the Input file.
Any solution how I can code it?
Thanks in advance.