hello,
the input file contains:
There are many "cfg:" stanzas in the file. What I need it to replace each nl's value in each cfg: stanza with corresponding nc's in that stanza so finally get output from example above:
best regards.
the input file contains:
Code:
aaaaaaaaaaaaaaa
bbbbbbbbbbbbbbb
ccccccccccccccc
some header
sssssssssssssss
cfg:
test=a
nc=3
mode=vvv
nl=7
cfg:
test=b
nc=1
mode=vvv
nl=5
There are many "cfg:" stanzas in the file. What I need it to replace each nl's value in each cfg: stanza with corresponding nc's in that stanza so finally get output from example above:
Code:
aaaaaaaaaaaaaaa
bbbbbbbbbbbbbbb
ccccccccccccccc
some header
sssssssssssssss
cfg:
test=a
nc=3
mode=vvv
nl=3
cfg:
test=b
nc=1
mode=vvv
nl=1
best regards.