Val si $ foo est défini (et non nul)

${FOO:+val}
Nicolas Chaillou