I have a file data like this:head data19  54240283    .   T   C   .   .   .    188,18:208:14:102:18:189:209:37.7222:37.4681:9:139:9:50:50.8889:40.3545:919.145:640.562:01   103020      .   A   C   .   .   .    1,2:3:2:2:2:2:4:38:38:2:2:0:0:46.5:28:0.5:162:02   8797402     .   G   A   .   .   .    0,3:3:3:0:3:0:3:38:0:0:3:0:38.3333:840.056:0The most important information is hidden at the 9th column (longest one), right between the 4th and 6th :. For example:19  54240283    .   T   C   .   .   .    18:1891   103020      .   A   C   .   .   .    2:22   8797402     .   G   A   .   .   .    3:0Finally, I would like to extract them out and create new columns for them. For example,19  54240283    .   T   C   .   .   .    18    1891   103020      .   A   C   .   .   .    2     22   8797402     .   G   A   .   .   .    3     0Could anyone help me figure out how to do this? Thanks!
How to extract out information separated by a character from a column?
linux;text processing;command line
awk solution:awk -F'[[:space:]]+|:' '{ print $1,$2,$3,$4,$5,$6,$7,$8,$13,$14 }' data | column -tThe output:19  54240283  .  T  C  .  .  .  18  1891   103020    .  A  C  .  .  .  2   22   8797402   .  G  A  .  .  .  3   0-F'[[:space:]]+|:' - whitespace(s) and : are considered as field separator