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

Sounds like what you actually want to do is check of -logfile was specified.

Replies are listed 'Best First'.
Re^4: Checking for STDIN
by dbmathis (Scribe) on Jul 30, 2008 at 02:38 UTC
    I think you are right. Might be the only way.

      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.

        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