[ale] help with a tiny shell script

jay jloden at toughguy.net
Tue Nov 16 00:31:26 EST 2004


Here's the scoop...I have about 330 csv files that are results files from a 
survey.  I want to import them into a spreadsheet for graphing, but when 
coding the survey in php, my partner and I didnt place a line break after 
each results file finishes.  

The result is 330 files like this: 

2,0,0,1,1,3,1,10,2,0,2,1,1,0,	*	"short answer" 

Each file is one line, with a set of comma deliminated numerical answers, then 
one short answer question, separated by the star as you see above.  What I 
want to do is basically: 

cat *.csv > append.csv 

but I want to add a linebreak between each file.  I can code this in python, 
but that seems unnecessarily complicated, and I'm almost positive if I knew 
how to utilize the shell better, I could do this in one command....can anyone 
shed some light on this for me? 

Thanks!

-Jay



More information about the Ale mailing list