awk - Delete space in a specific column using sed or cut -


i have file a.pdb as

atom      1  n   arg     1     -19.794 -23.351   -9.550  1.00  0.00           n atom      2  h1  arg     1     -20.314 -23.948   -8.920  1.00  0.00           h atom      3  h2  arg     1     -18.811 -23.572   -9.490  1.00  0.00           h atom      4  h3  arg     1     -20.049 -23.660  -10.480  1.00  0.00           h atom      5  ca  arg     1     -20.087 -21.926   -9.380  1.00  0.00           c 

i want delete 1 space between field 7 , 8, without changing format, shifting 1 character backwards. decimal points should appear in column 35, 43 , 51 (now on 35, 43 , 52).

sed -r 's/^(.{46}) /\1/' infile > outfile 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -