[Noob] Merging line of a file for consolidation...
Hi there,
I was wondering if somebody has already got this tricky one. I'm trying to consolidate a huge CSV file with a lot of values so server comparison. This file is similar to the example below: server1;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 server2;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 server2;0;0;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 server3;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 server3;0;0;0;0;0;0;0;0;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 server3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0 server4;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 As you can see, in server2 example, I need to merge all the occurrences of it replacing all zero values with a non zero value where applicable. Not sure if I made myself clear. Any clues? |
ummmm .. huh?? Is the idea that once you have run something over this file each server will only have a single entry where all the '1' values should prevail over a '0'?
|
I think OP is saying he wants to do a bitwise OR on a per-colum basis (for matching server #s). So:
Code:
server5;0;0;1;0 Code:
server5;1;1;1;0 |
All times are GMT -5. The time now is 08:23 AM. |