I just wrote a function in my ~/.bashrc that will let me create a folder for a new website with one command. The function looks like this:function newsite() {  mkcd $*  # mkdir and cd into it  mkdir js  mkdir imgs  touch index.html  touch main.css  vim index.html}Woo hoo super complicated function... Okay in all seriousness I understand this is really basic, it's the first function I've made without copy and pasting from online though so bear with me.Now what I would like to do is, instead of just touching index.html and main.css I'd like to create basic template files for index.html and main.css problem is I have absolutely no idea how to do that. I don't know much about writing to files using bash commands. Typically I'd just open the files in vim and go to town but I'd like to have something already started when I get into vim...
Script to create files in a template
bash;vim;function
jw013's idea and HaiVu's answer are both correct. However for the sake of completeness for anyone who comes upon this question wanting the answer, here it is;function newsite() {  mkcd $*  # mkdir and cd into it  mkdir js  mkdir imgs  cat > index.html <<'EOI'<html><head></head><body></body></html>EOI  cat > main.css <<'EOI'body { font-family: Arial;}EOI  vim index.html}The <<'EOI' thing is called a heredoc, most scripting languages have them.