I've this file:
SORTIN01 DD *
AAAAAAAA
BBBBBBBB
CCCCCCCC
DDDDDDDD
EEEEEEEE
I'd like use sort to produce a SORTOUT file like this:
SORTOUT DD *
AAAAAAAA00000000010000000005
BBBBBBBB00000000020000000005
CCCCCCCC00000000030000000005
DDDDDDDD00000000040000000005
EEEEEEEE00000000050000000005
The first 08 bytes are the content of the input file, the next 10 bytes are a sequential number starting in 1 and incremented from 1 by 1, and the last 10 bytes are the total count of the registers in a file.
I know how to count the total of the registers using sort in a trailer of a file, but I don't know how to count the total count registers in a detail register.
I appreciate if anyone knows how to help me.
Thanks.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…