You can also use the cat command and a "here" document. This is an example from the
Linux From Scratch docs and creates the ~/.bashrc file:
Code:
cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF
For more info run
man bash and search on
here documents or run the same search on google.