Code:
#!/bin/bash
set -u
ls /etc
{
ls /
SUBJECT=TEST
} | mail -s "$SUBJECT" $ME
This returns "unbound variable" or just a blank subject w/o set -u. I thought the commands/script outside of the curly braces can see the variable $SUBJECT as it's supposed to be global.
I am missing something basic here.
Thanks!
jouell