Usually that is done in a shell script:
Code:
#!/bin/bash
cat >testtest <<EOF
data to be put in testtestfile
EOF
Also there is the ability to support indentation to make things a bit clearer:
Code:
#!/bin/bash
cat >testtest6 <<-EOF
data to be put in testtestfile
note, leading blanks trimmed
EOF
If the "EOF" is in quotes, then substitutions within the "data to be..." are disabled. Allowing substitutions is nice for generating reports... Things like headers/dates or special text can then be substituted on the fly.
Here documents work the same way for csh, and (I believe) tcsh.