Hello, I ran into this problem which I cannot figure out. I must have missed something. I'm using sid with bash version 3.1.5(1). <script1> cat <<EOF >>outfile Some words EOF </script1> works but when it is embedded inside an if-then-fi construct like, <script2> AAA="" if [ -z "$AAA" ]; then cat <<EOF >>outfile Some words EOF fi </script2> it fails with error message "script2: line 7: syntax error: unexpected end of file" What have I missed? Regards, ST --