#!/usr/bin/awk -f # Copyright 2001 Blossom Associates West # All rights reserved. # Change the delimiter (field separator). BEGIN { # Simple csv to tsv # BUG: quoted commas still act as field separators. # i.e. one,"two,three",four # becomes: one\t"two\t three"\tfour # but it should become: one\t"two, three"\tfour # The C program csv2tsv.c does a better job. FS = ", *"; OFS = "\t"; } 0 < NF { $1 = $1; # forces conversion from FS to OFS. } { print; }