in reply to Re^4: Checking for STDIN
in thread Checking for STDIN

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.

Replies are listed 'Best First'.
Re^6: Checking for STDIN
by dbmathis (Scribe) on Jul 30, 2008 at 13:14 UTC
    Yeah, there is something I didn't mention that hurts the checking for -logfile (the most obvious). I got my script to work however checking for -logfile doesn't work because the user might forget to use the -logfile option and I have to check for that too.

    Best Regards

      There's not much that can be done when they user tells you to do something other than what he wants you to do.