Use the heredoc syntax to embed the other script within a shell script:
cat > file.tmp <<'endmsg'
script goes here...
endmsg
Use the heredoc syntax to embed the other script within a shell script:
cat > file.tmp <<'endmsg'
script goes here...
endmsg