It takes raw data files and add commas between columns. It is far from perfect as columns that are blank get shifted over which completely distorts my data: Thisawk ' {OFS=","}; $1~/^[***]/{next} $1~/^[A-Z]/{next} $1~/^--/{next} { printf "%4s,%4s,%3s,%13s,%5s,%10s,%5s,%10s,%-3s,%12s,%-3s +,%10s\n", $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12 } ' input.txt > output.csv
BecomesVOL TEST @VCC= 4.5V, VIL=2V, VIH=5.5V 5 796 6 533.0 mV,RNG1 60.00 mA,M100 + 5 801 493.0 m 0 500.0 m + 5 815 8 431.0 mV,RNG1 60.00 mA,M100 + 5 820 391.0 m 0 500.0 m
It would be nice to keep the heading, but it was messy and so I've learned to live without it. I hope Perl can do the job without distorting the data. Any help is greatly appreciated for I'm at a complete loss. My apologies about the formatting, I failed to read fully before posting and so assume that I was experiencing a serving error.5, 796, 6, 523.0,mV,RNG1, 60.00,mA,M100, 5, 801,483.0, m, 0, 500.0, m, , , <-t +he row closed ranks some how. 5, 815, 8, 418.5,mV,RNG1, 60.00,mA,M100, 5, 820,378.5, m, 0, 500.0, m, , ,
In reply to How to create an accurate CSV file by softserve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |