[ale] Bash: How to determine if called from cron?
David A. De Graaf
dad at datix.2y.net
Mon Jun 27 09:35:53 EDT 2005
On Mon, Jun 27, 2005 at 12:17:00AM -0400, Christopher Bergeron wrote:
> Does anyone know of an easy way for my script to determine if it's being
> run from cron or from a user shell?
Read about the 'tty' command.
Try this example script, both manually and via cron:
ANS=`tty`
echo ANS: $ANS
--
David A. De Graaf DATIX, Inc. Hendersonville, NC
dad at datix.2y.net www.datix.us
More information about the Ale
mailing list