Code:
> cat file141
Trace1: WRIT,Trace2: BLAN,Trace3: BLAN,
-47.2120018005371,,,39815.4809027778
-46.3009986877441,,,39815.4809027778
-46.277000427246,,,39815.4809143519
-46.7389984130859,,,39815.4809259259
-46.3460006713867,,,39815.4809259259
-45.9309997558593,,,39815.4809375
-46.9119987487792,,,39815.4809490741
-46.5379981994628,,,39815.4809606482
-46.9640007019042,,,39815.4809722222
-46.8390007019042,,,39815.4809722222
-47.1399993896484,,,39815.4809837962
-46.1370010375976,,,39815.4809953704
> cat fix141
tail +2 file141 | cut -d"," -f4 | tr "\n" "," >file141.tmp
echo "~" >>file141.tmp
tail +2 file141 | cut -d"," -f1 | tr "\n" "," >>file141.tmp
echo "~" >>file141.tmp
sed "s/,~//g" file141.tmp >file141.out
cat file141.out
> fix141
39815.4809027778,39815.4809027778,39815.4809143519,39815.4809259259,39815.4809259259,39815.4809375,39815.4809490741,39815.4809606482,39815.4809722222,39815.4809722222,39815.4809837962,39815.4809953704
-47.2120018005371,-46.3009986877441,-46.277000427246,-46.7389984130859,-46.3460006713867,-45.9309997558593,-46.9119987487792,-46.5379981994628,-46.9640007019042,-46.8390007019042,-47.1399993896484,-46.1370010375976