I am trying to capture all the input and output from a bash script that I created to install nagios. I have a log file created using tee right now, but it only appears when there is an echo command or some kind of output from "service httpd restart". I basically want to capture the input that the user enters into the log file for future reference.
The command scriptlaunched before your program will write all the input and output data to the file you specified. It ends with ctrl-D.
script
script -c yourprogram filename
can do what you are looking for. See the man page for the script.