Bash aquí ejemplo de documento

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