I don't know about it being the only way, but checking if -logfile was provided as an argument is definitely the most direct way of doing something only if -logfile was provided as an argument.
I don't see what cron or STDIN has to do with anything. Is there some other case you haven't mentioned?
By the way, I don't see why you don't just pipe it in from cron like you do from the command line.
In reply to Re^5: Checking for STDIN
by ikegami
in thread Checking for STDIN
by dbmathis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |