I'm trying to use functions in a shell script and can't get a heredoc within a function working.
Bash:
func1()
{
cat <<EOF >abc
cd /
ls -al
EOF
}
func1
Any ideas?I get end of file unexpected (expecting "}")