|Perl: the Markov chain saw|
Detecting interactive/non-interactive shellby kosun (Acolyte)
|on Jul 03, 2005 at 18:03 UTC||Need Help??|
kosun has asked for the
wisdom of the Perl Monks concerning the following question:
I want to be able to detect if my script is being run interactively from the command line or non interactively say via system call, cron, etc.
I want it redirect stdout,stderr to a file if non interactive.
Does anyone know how to detect this programmatically?