I have the following script
awk \'{printf \"%s\", $1\"-\"$2\", \"}\' $a >> positions;
where $a stores the name of the fi
$a
Here's a better way, without resorting to coreutils:
awk 'FNR==NR { c++; next } { ORS = (FNR==c ? "\n" : ", "); print $1, $2 }' OFS="-" file file