#!/bin/bash
echo '"2017-09-30","ACBD,TVF","01234",NULL,18,NULL,"686091802","BANK OF ABCD, LIMITED, THE",790456' |
awk -v OFS='|' -v FPAT='"[^"]*"|[^,]*' '{
for (h=1; h<=NF; h++) printf "%s%s", $h, (h < NF ? OFS : ORS)
}'
IyEvYmluL2Jhc2gKCmVjaG8gJyIyMDE3LTA5LTMwIiwiQUNCRCxUVkYiLCIwMTIzNCIsTlVMTCwxOCxOVUxMLCI2ODYwOTE4MDIiLCJCQU5LIE9GIEFCQ0QsIExJTUlURUQsIFRIRSIsNzkwNDU2JyB8IAphd2sgLXYgT0ZTPSd8JyAtdiBGUEFUPSciW14iXSoifFteLF0qJyAnewogICBmb3IgKGg9MTsgaDw9TkY7IGgrKykgcHJpbnRmICIlcyVzIiwgJGgsIChoIDwgTkYgPyBPRlMgOiBPUlMpCn0nCgo=