fix bash "read -d" usage