CSV parsing is not easily done with POSIX tools only, unless you are using a simplified CSV variant with no quoting (so that commas can't appear in a field). Even then, this task doesn't seem easy to do with awkawk or other text processing to tool. You can use Perl with Text::CSV, Python with csv, R with read.csv, Ruby with CSV, … (All of these are part of the standard library of the respective language except for Perl.)
For example, in Python:
import csv, sys rows = list(csv.reader(sys.stdin)) writer = csv.writer(sys.stdout) for col in xrange(0, len(rows[0])): writer.writerow([row[col] for row in rows]) import csv, sys rows = list(csv.reader(sys.stdin)) writer = csv.writer(sys.stdout) for col in xrange(0, len(rows[0])): writer.writerow([row[col] for row in rows])