fork(5) download
  1. #!/bin/bash
  2.  
  3. echo '"2017-09-30","ACBD,TVF","01234",NULL,18,NULL,"686091802","BANK OF ABCD, LIMITED, THE",790456' |
  4. awk -v OFS='|' -v FPAT='"[^"]*"|[^,]*' '{
  5. for (h=1; h<=NF; h++) printf "%s%s", $h, (h < NF ? OFS : ORS)
  6. }'
  7.  
  8.  
Success #stdin #stdout 0s 24232KB
stdin
Standard input is empty
stdout
"2017-09-30"|"ACBD,TVF"|"01234"|NULL|18|NULL|"686091802"|"BANK OF ABCD, LIMITED, THE"|790456