val, jeśli $ foo jest ustawiony (a nie null)

${FOO:+val}
Nicolas Chaillou