#!/bin/bash
LINE=foo,bar,,baz
IFS=, array=($LINE)
printf '>>%s<<\n' "${array[@]}"