我有一些文件如下所示。如果该列为空白,我需要在第五列中添加一个字符“C”。我更喜欢就地编辑。
1 87 E P 0 0 131 0, 0.0 0, 0.0 0, 0.0 0, 0.0 0.000 360.0 360.0 360.0 150.0 7.2 83.8 79.2
2 88 E V + 0 0 136 1,-0.1 2,-0.5 3,-0.0 0, 0.0 0.993 360.0 80.8 -61.8 -61.8 7.7 80.9 76.8
3 89 E K S S+ 0 0 195 2,-0.0 2,-0.3 0, 0.0 -1,-0.1 -0.222 77.4 108.3 -45.5 95.3 5.5 82.5 74.2
4 90 E R S S- 0 0 153 -2,-0.5 2,-0.5 2,-0.0 0, 0.0 -0.864 72.2-119.8-173.3 140.8 8.2 84.8 72.9
5 191 E R - 0 0 202 -2,-0.3 2,-0.2 1,-0.0 -2,-0.0 -0.772 46.1-115.0 -83.4 130.6 10.4 85.4 70.0
6 92 E L H - 0 0 109 -2,-0.5 2,-0.5 1,-0.1 -1,-0.0 -0.499 24.5-142.8 -70.2 134.3 14.0 85.3 71.3
7 93 E D + 0 0 126 -2,-0.2 -1,-0.1 1,-0.1 0, 0.0 -0.852 36.1 149.0-101.0 126.6 15.9 88.6 71.1
8 94 E L 0 0 140 -2,-0.5 -1,-0.1 0, 0.0 -2,-0.0 0.735 360.0 360.0-125.7 -35.5 19.6 88.3 70.3
9 95 E E 0 0 235 0, 0.0 -2,-0.0 0, 0.0 0, 0.0 0.494 360.0 360.0 -8.6 360.0 21.0 91.3 68.3
期望的输出
1 87 E P C 0 0 131 0, 0.0 0, 0.0 0, 0.0 0, 0.0 0.000 360.0 360.0 360.0 150.0 7.2 83.8 79.2
2 88 E V C + 0 0 136 1,-0.1 2,-0.5 3,-0.0 0, 0.0 0.993 360.0 80.8 -61.8 -61.8 7.7 80.9 76.8
3 89 E K S S+ 0 0 195 2,-0.0 2,-0.3 0, 0.0 -1,-0.1 -0.222 77.4 108.3 -45.5 95.3 5.5 82.5 74.2
4 90 E R S S- 0 0 153 -2,-0.5 2,-0.5 2,-0.0 0, 0.0 -0.864 72.2-119.8-173.3 140.8 8.2 84.8 72.9
5 191 E R C - 0 0 202 -2,-0.3 2,-0.2 1,-0.0 -2,-0.0 -0.772 46.1-115.0 -83.4 130.6 10.4 85.4 70.0
6 92 E L H - 0 0 109 -2,-0.5 2,-0.5 1,-0.1 -1,-0.0 -0.499 24.5-142.8 -70.2 134.3 14.0 85.3 71.3
7 93 E D C + 0 0 126 -2,-0.2 -1,-0.1 1,-0.1 0, 0.0 -0.852 36.1 149.0-101.0 126.6 15.9 88.6 71.1
8 94 E L C 0 0 140 -2,-0.5 -1,-0.1 0, 0.0 -2,-0.0 0.735 360.0 360.0-125.7 -35.5 19.6 88.3 70.3
9 95 E E C 0 0 235 0, 0.0 -2,-0.0 0, 0.0 0, 0.0 0.494 360.0 360.0 -8.6 360.0 21.0 91.3 68.3