Any filehandle you can test with -t can be redirected on the command line. Using -t to ask "is the script running from the command line?" will result in false negatives.
P.S. Did you mean tye's method?
In reply to Re: Re: Detecting running from cron?
by chipmunk
in thread Detecting running from cron?
by oakley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |