#!/bin/bash if [ $# -ne 2 ]; then echo "Usage: translate_csv_file " exit 127 fi cat $1 | tr -s '""' '"' | sed '1,$s/\,"/\,/g' | sed '1,$s/"\,/\,/g' | sed '1,$s/"$//g' > $2 echo "Done. Output filename is \"$2\"."