mysql --raw --skip-column-names -u someuser -psomepass -h somehost -b somedatabase -e "select * from somedatabase.sometable;"| awk -F\\t '{print $1","$2","$3}'
-F\\t tells awk to use a tab as the delimeter on its input, and we print out the desired columns with commas as delimeters using the "," bit. Replace "," with ":" or "|" or whatever to suit your needs.
Если вам нужно заключить в кавычки выходное поле, скажем, $ 1, ваш awk-отпечаток будет выглядеть так:
awk -F\\t '{print "\""$1"\","$2","$3}'