In shell script, We can change the default input to a File using the exec command as follow :
exec 1>outputfile
However, if in the sa
Try the "tee" command:
exec | tee outputfile
Look at the tee manpage for more explainations:
tee - read from standard input and write to standard output and files