Your syntax is wrong. In rc the here document comes after the closing brace, as in:for(i in 1 2 3) { cat <<EOF } Hello EOF
dreadful!
However, note the BUGS section of rc(1): "Functions that use here documents don't work."
I didn't aware... Thanks Kenji Arisawa
