Exemplo de documento Bash aqui

cat << EOF > file.txt
The current working directory is: $PWD
You are logged in as: $(whoami)
EOF
Elegant Elk