We have a text file with different records formats, indentified by a 'record type' code, found in character positions 19-20 (teh code is two characters).
In a ksh Unix script, I need to extract and process record type '13' from this file. There will be only one such record on file.
Can you indicate syntax for "sed" or other command that can be used to achieve that?
for eg we use following command to obtain the 'year' from first record on file:
year="`sed -n -e '1p' ${file_name}.head | cut -c34-37`"
I would need something similar, but replacing "first record" by "record with '13' in char positions 19-20
In a ksh Unix script, I need to extract and process record type '13' from this file. There will be only one such record on file.
Can you indicate syntax for "sed" or other command that can be used to achieve that?
for eg we use following command to obtain the 'year' from first record on file:
year="`sed -n -e '1p' ${file_name}.head | cut -c34-37`"
I would need something similar, but replacing "first record" by "record with '13' in char positions 19-20