I have a flat file A.txt with field seperate by a pipe
2012/11/13 20:06:11 | 284:hawk pid=014268 opened Locations 12, 13, 14, 15 for /home/hawk_t112/t112/macteam/qt/NET12/full_ddr3_2X_FV_4BD_1.qt/dbFiles/t112.proto|2012/11/14 15:19:26 | still running |norway|norway
2012/11/14 12:53:51 | 286:hawk pid=012538 opened Locations 8, 9, 10, 11 for /home/hawk_t112/t112/macteam/qt/NET08/.try_3.qt/dbFiles/t112.proto|2012/11/14 15:19:26 | still running |norway|norway
2012/11/14 14:23:19 | 288:hawk pid=019275 opened Locations 0, 1, 2, 3, 4, 5, 6, 7 for /home/hawk_a108/a108/macteam/qt/NET24/full_111_ddr5_soq523_2X_FV.qt/dbFiles/a108.proto|2012/11/14 15:19:26 | still running |norway|norway
How do we use awk or shell program to get output file B.txt
2012/11/13 20:06:11 | Locations 12, 13, 14, 15|NET12/full_ddr3_2X_FV_4BD_1.qt|norway|norway22
** 22 is first location 12+10 ** Do not include in out put
2012/11/14 12:53:51 | Locations 8, 9, 10, 11|NET08/.try_3.qt|norway|norway18
** 18 is first Locations 8+10 *** Do not include in out put
2012/11/14 14:23:19 |Locations 0, 1, 2, 3, 4, 5, 6, 7 |NET24/full_111_ddr5_soq523_2X_FV.qt|norway|norway10
** 10 is first Locations 0+10 *** Do not include in out put
I hope you understand what i would like to get it from B.txt
Thanks.