Hej All,
I have a file like this which is a comma dilimited:
input:
6000318,-263.011520678,-59.05869872409,587.67924868792
6000319,-265.6996842902,-50.24902479999,590.65693082607
6000320,-238.1333898366,-288.801232595,633.75332173496
6000321,-238.0466734864,-290.7217772662,623.60922656308
6000322,-237.8308371431,-291.5919339073,613.85206092817
6000323,-237.6900817526,-281.0114436973,613.12390164076
6000324,-238.0551925104,-270.3998913848,611.9122076891
6000325,-237.7062987535,-279.5289804322,623.0771105491
6000326,-237.7545552067,-276.8706392,633.45978643332
6000327,-237.8064447543,-268.6579344511,621.6766956356
6000328,-237.8039226993,-273.3144349458,643.99521886477
6000329,-237.7138565922,-265.9359211197,632.01000386728
6000330,-237.699411038,-260.1218696827,643.38639576584
6000331,-238.037499527,-252.9476448912,636.14668632827
6000332,-238.5361360976,-243.2849203525,637.19146375821
and want to convert it to an ascii file, which the first column is 8bit and other columns are 16 bit and the output would be like this:
output:
6000318 -263.011520678 -59.05869872409 587.67924868792
6000319 -265.6996842902 -50.24902479999 590.65693082607
6000320 -238.1333898366 -288.801232595 633.75332173496
6000321 -238.0466734864 -290.7217772662 623.60922656308
6000322 -237.8308371431 -291.5919339073 613.85206092817
6000323 -237.6900817526 -281.0114436973 613.12390164076
6000324 -238.0551925104 -270.3998913848 611.9122076891
6000325 -237.7062987535 -279.5289804322 623.0771105491
6000326 -237.7545552067 -276.8706392 633.45978643332
6000327 -237.8064447543 -268.6579344511 621.6766956356
6000328 -237.8039226993 -273.3144349458 643.99521886477
6000329 -237.7138565922 -265.9359211197 632.01000386728
6000330 -237.699411038 -260.1218696827 643.38639576584
6000331 -238.037499527 -252.9476448912 636.14668632827
6000332 -238.5361360976 -243.2849203525 637.19146375821
How could I do this conversion with bash scripting?
tnx