hi,
i want to redirect my output & error if generated to two different files. I
have written the code for redirecting the output, i dnt have ne idea how to
go abt it for errors. I tried spooling which was given in one of the
threads on this forum.But it didn't work.The script i wrote as a lot of
select queries only and it works fine.
-----SCRIPT------
{
echo "SELECT empno from emp where rownum<5;"
} | sqlplus -s $username/$password@DB >> $root_dir/$filename
I would not expect it to work, as sqlplus does not write to standard error (2>...). Your best bet is probably to parse the one output file you do get, for errors.