Shell script to convert to CSV