Is there a way in a shell script to figure out where its output is redirected?
We have scripts of following nature (in cron)

`someScript.sh > /tmp/cronlog/somescript.$(date +%Y%m%d).log 2>&1`

Now is there a way by which with in `someScript.sh` I can figure out what file the output has gone in to?

The script sends email with summary. At the same time I would like to mention that  details could be found in so and so output file - with in the email.


I am aware of the construct `if [ -t 1 ]` to detect stdout etc but how to get the output file name? 
Note that I want this to be generic so that some one can change the output file in cron and the script does not need to be modified.
Is there a way in a shell script to figure out where its output is redirected?
===

We have scripts of following nature (in cron)

`someScript.sh > /tmp/cronlog/somescript.$(date +%Y%m%d).log 2>&1`

Now is there a way by which with in `someScript.sh` I can figure out what file the output has gone in to?

The script sends email with summary. At the same time I would like to mention that  details could be found in so and so output file - with in the email.


I am aware of the construct `if [ -t 1 ]` to detect stdout etc but how to get the output file name? 
Note that I want this to be generic so that some one can change the output file in cron and the script does not need to be modified.