gargamel100
Technical User
Hi people,
I need your help if somebody know how to do this
I have file like let's say fileA
$11 !~ /^6(1|2)/ && $9 == "2222 " {sum1 = sum1 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80205" {sum15 = sum15 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80206" {sum16 = sum16 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80207" {sum17 = sum17 + $19 }
and fileB
$9 == " 2222" {a=a+1}
$9 == "90000" {k=k+1}
$9 == "80205" {n=n+1}
$9 == "80206" {o=o+1}
this is just excerpt, they are big files cca 300 lines, both. Is ther any way to catenate files A and B, but to change only part $9.... from fileB ( in other words to input values of $9 from fileB into fileAs column $9 ) to fileA. Why I need this. Some values in fileB column $9... are newer than ones I have in fileA, but they should be the same. Both have the same numbers of rows, but that doesn't care, just input values from fileB ($9...) to fileA ($9...) and values in fileA like after catenation.
$11 !~ /^6(1|2)/ && $9 == "2222 " {sum1 = sum1 + $19 }
$11 !~ /^6(1|2)/ && $9 == "90000" {sum15 = sum15 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80205" {sum16 = sum16 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80206" {sum17 = sum17 + $19 }
Regards and thank you.
I need your help if somebody know how to do this
I have file like let's say fileA
$11 !~ /^6(1|2)/ && $9 == "2222 " {sum1 = sum1 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80205" {sum15 = sum15 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80206" {sum16 = sum16 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80207" {sum17 = sum17 + $19 }
and fileB
$9 == " 2222" {a=a+1}
$9 == "90000" {k=k+1}
$9 == "80205" {n=n+1}
$9 == "80206" {o=o+1}
this is just excerpt, they are big files cca 300 lines, both. Is ther any way to catenate files A and B, but to change only part $9.... from fileB ( in other words to input values of $9 from fileB into fileAs column $9 ) to fileA. Why I need this. Some values in fileB column $9... are newer than ones I have in fileA, but they should be the same. Both have the same numbers of rows, but that doesn't care, just input values from fileB ($9...) to fileA ($9...) and values in fileA like after catenation.
$11 !~ /^6(1|2)/ && $9 == "2222 " {sum1 = sum1 + $19 }
$11 !~ /^6(1|2)/ && $9 == "90000" {sum15 = sum15 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80205" {sum16 = sum16 + $19 }
$11 !~ /^6(1|2)/ && $9 == "80206" {sum17 = sum17 + $19 }
Regards and thank you.