Hi
I have a rather complex replacement that I need to make in a very large file.
The file is buield up like this.
This eksampel contains 3 elements, I've marked the middelone.
I need to take the amount in the line starting with REC02 and put into the top line.
This is an exampel where the markede element is correct.
The number 200011 is the identifier and is always unique.
I can make a file from the identifier and the right figure, but I don't know the figure that I have to replace.
The result fra this is 130000 lines.
Does anyone have any ideers?
/LHG
I have a rather complex replacement that I need to make in a very large file.
The file is buield up like this.
Code:
200001 12345432078934
REC0200001 37,47
[b]200011 1234543207893
REC0200011 30,47
[/b]200061 12345432004047
REC0200061 40,47
This eksampel contains 3 elements, I've marked the middelone.
I need to take the amount in the line starting with REC02 and put into the top line.
This is an exampel where the markede element is correct.
Code:
200011 123454320[b]3047[/b]
REC0200011 [b]30,47[/b]
The number 200011 is the identifier and is always unique.
I can make a file from the identifier and the right figure, but I don't know the figure that I have to replace.
Code:
cat file|grep REC02|awk -F "REC02" '{print $2}'|awk '{print $1 " " $2}'|sed s/,//
The result fra this is 130000 lines.
Does anyone have any ideers?
/LHG