Thank you. I was relying on the readers to consult the manual on -t (especially since I didn't say whether a true or false value from -t meant "running from cron"). But that was a pretty poor assumption on my part.
Reading between the lines of the question, I got the impression that the stuff going to STDOUT was meant only to be seen by interactive users, which is why I suggested -t STDOUT. Thinking on it more, I think a better test for this case is -t STDERR so that script <input | more would be considered "interactive" while the cron case specifically stated that STDERR was redirected to a file.
- tye (but my friends call me "Tye")In reply to (tye)Re2: Detecting running from cron?
by tye
in thread Detecting running from cron?
by oakley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |