Link to home
Start Free TrialLog in
Avatar of yppirt090497
yppirt090497

asked on

redirecting stdout from within ksh script

Is it possible to execute an intruction at the top of a ksh script to redirect any further standard output to a file? I want to avoid having to create another script which calls the main script with redirection.
Avatar of onestar
onestar

Can you give a example of what you are looking (a copy of you script)?
ASKER CERTIFIED SOLUTION
Avatar of aditya070797
aditya070797

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yppirt090497

ASKER

Tested and it works nicely.

I was also sent another solution which uses 'exec'.

exec 1>foo
exec 2>foo
echo "test redirect"