I want to take previous record key value and need to update it next record which does not have a key.
Input file as below:
1111 aaaa
2222 bbbb
cccc
dddd
3333 eeee
4444 fffff
gggg
2222 bbbb
cccc
dddd
3333 eeee
4444 fffff
gggg
Output file should be like below:
1111 aaaa
2222 bbbb
2222 cccc
2222 dddd
3333 eeee
4444 fffff
4444 gggg
2222 bbbb
2222 cccc
2222 dddd
3333 eeee
4444 fffff
4444 gggg
Thanks in advacne !
Code'd