Something I keep having to look up how todo so I'm putting it here for future reference:
Suppose you have a comma separated file, say the list of Abell clusters: e.g. first line:
1,1.89167,16.50972,0.1249,514.3,3.342
and you want to convert this into a nice tab spaced data set and cut off the header...
awk -F',' '{printf("%10.8f\t%10.8f\t%10.8f\t%10.8f\t%10.8f\t%10.8f\n", $1,$2,$3,$4,$5,$16)}' abell_all.csv > temp_abellcut
len=$(wc -l temp_abellcut | awk '{print $1 -1}')
tail -n $len temp_abellcut > abell_all.dat
rm -rf temp_abellcut
echo "id ra dec z D search_radius" > abell_all.header
... and bob's ya uncle.







