To the beginning of your script, add:
Code:
exec &> capture.txt
for example:
Code:
#!/bin/bash
exec &> capture.txt
echo "This will be piped to capture.txt"
That will redirect all output to the file capture.txt.
As for your second question, I don't think it's possible to have stdout and stderr sent to both the terminal and a file using exec. You can do it from the command line easily enough:
./myscript.sh 2>&1 | tee capture.txt
The link which zackarya provided also discusses the tee command.