Help in korn shell scripting...
Posted: Tue Jul 04, 2006 6:18 pm
Hi,
How to achieve this? Let us assume the following:
There are 2 scripts a.ksh and b.ksh
$ cat a.ksh
sh b.sh 2>&1 >> /work/log/a_log.txt
$ cat b.sh
echo "abcd"
My requirement is, is there a way to display this abcd in standard output also alongside of writing into a_log.txt?
The catch here is I cannot modify the script a.ksh as there are innumerous shell scripts like a.ksh that call b.ksh. So here I can modify b.ksh alone to achieve the result.
Please suggest if there is anyway to modify b.ksh to output the result to standard output as well.
Please help me out in this. Appreciate your help.
How to achieve this? Let us assume the following:
There are 2 scripts a.ksh and b.ksh
$ cat a.ksh
sh b.sh 2>&1 >> /work/log/a_log.txt
$ cat b.sh
echo "abcd"
My requirement is, is there a way to display this abcd in standard output also alongside of writing into a_log.txt?
The catch here is I cannot modify the script a.ksh as there are innumerous shell scripts like a.ksh that call b.ksh. So here I can modify b.ksh alone to achieve the result.
Please suggest if there is anyway to modify b.ksh to output the result to standard output as well.
Please help me out in this. Appreciate your help.