5

"exec" command. Stopoutput to file.

view full story
linux-howto

http://www.unix.com – I have a script (ksh, Linux) which is about 500 lines and this is only a small requirement. Below is an example of my requirement. Code: FunctionThis(){   echo "You are in this. Goes to log" } FunctionThat(){   echo "You are in That. Goes to log" } FunctionScreen(){   echo "You are in Screen. Goes to screen."   echo "Press ^c to exit"   sleep 60 } ################ # Main ################ exec > Outlog1.txt 2>&1 FunctionThis FunctionThat exec > > 2>&1 FunctionScreen 1. Now all the outputs are going t (HowTos)