02120 aa_merge_20190711_551_1000020250198 column=aa: c4, timestamp=1562935948187, value=https://bbs.csdn.net/topics/250
02120 aa_merge_20190711_551_1000020250198 column=aa: c5, timestamp=1562935948187, value=https://bbs.csdn.net/topics/20190519
02120 aa_merge_20190711_551_1000020250198 column=aa: c2, timestamp=1562935948187, value=https://bbs.csdn.net/topics/0
02120 aa_merge_20190711_551_1000020250198 column=aa: c3, timestamp=1562935948187, value=https://bbs.csdn.net/topics/551
02120 aa_merge_20190711_551_1000020250198 column=aa: c1, timestamp=1562935948187, value=https://bbs.csdn.net/topics/aa_MERGE_20190711_551_1000030
02120 aa_merge_20190711_551_1000020250201 column=aa: c1, timestamp=1562935948187, value=https://bbs.csdn.net/topics/aa_MERGE_20190711_551_1000020
02120 aa_merge_20190711_551_1000020250201 column=aa: c3, timestamp=1562935948187, value=https://bbs.csdn.net/topics/160
02120 aa_merge_20190711_551_1000020250201 column=aa: c4, timestamp=1562935948187, value=https://bbs.csdn.net/topics/167
02120 aa_merge_20190711_551_1000020250201 column=aa: c2, timestamp=1562935948187, value=https://bbs.csdn.net/topics/0558
02120 aa_merge_20190711_551_1000020250201 column=aa: c5, timestamp=1562935948187, value=https://bbs.csdn.net/topics/69
-- -- -- -- -- -- -- -- -- -- -- -- expected results -- -- -- -- -- -- -- -- -- -- -- -- -- --
Aa_MERGE_20190711_551_1000020 | 0558 | 160 | 167 | 69 | 02120 aa_merge_20190711_551_1000020250201
Aa_MERGE_20190711_551_1000030 | 0 551 | | 250 | 20190519 | 02120 aa_merge_20190711_551_1000020250198
CodePudding user response:
Don't know what you meanCodePudding user response:
Recommend http://www.zsythink.net/archives/tag/awkGood thing!
{
A [$1] [$2]=$4.
}
END {
For (a) in I {
For (k in a [I]) {
Out [I]=sprintf (" | "% s % s, out [I], gensub (/value=https://bbs.csdn.net/topics/(. +)/, \ " "1", "g", a [I] [k]));
}
}
For (I in out) {
Print (sprintf (" % s % s ", the out [I], I));
}
}