This is a part of the output file (x.out, from a chemical software). I need to extract the xyz coordinates with the atom labels from this file.If it's possible i would like to use a bash shell script. I am new to this forum, how can I solve this problem.
DIPOLE X Y Z TOTAL
POINT-CHG. -7.830 4.081 -5.801 10.565
HYBRID -1.256 0.544 -0.035 1.369
SUM -9.086 4.625 -5.836 11.748
CARTESIAN COORDINATES
NO. ATOM X Y Z
1 C 2.3796 -0.9080 -0.5529
2 C 2.3639 -1.1281 0.9763
3 S 0.8125 0.6435 -2.1375
4 O 0.6957 -0.5657 -2.9187
5 O 1.0227 1.8996 -2.8206
6 N 1.8371 0.4619 -0.8145
7 O 1.5003 -1.8807 1.4665
8 N 3.3721 -0.6712 1.7823
the new file needs to look like this:
C 2.3796 -0.9080 -0.5529
C 2.3639 -1.1281 0.9763
S 0.8125 0.6435 -2.1375
O 0.6957 -0.5657 -2.9187
O 1.0227 1.8996 -2.8206
N 1.8371 0.4619 -0.8145
O 1.5003 -1.8807 1.4665
N 3.3721 -0.6712 1.7823
Is it possible to cut it out like this? Search for expression "Cartesian Coordinates", then use -grep, csplit, cut or combine them to get rid of the number's row (first tab). I need this plzzz.