On Tue, Jan 16, 2007, Don O'Neil wrote: >Anybody have any clues why a shell script run from root's CRON would act >differently then when run directly from the command line?
Most often this is because the environment in the cron job is different, either missing variables or having variables that aren't set to a reasonable value (e.g. TERM). The way I usually figure something like this out is to dump the envioronment from the cron job, then do the same thing from the command line, then compare the two. #!/bin/sh # this is the cron job env | sort > /tmp/env.cron exit; Now from the command line ``env | sort > /tmp/cron.cli''. Now run something like ``diff -u /tmp/env.cron /tmp/cron.cli'' to see what is different. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 When a place gets crowded enough to require ID's, social collapse is not far away. It is time to go elsewhere. The best thing about space travel is that it made it possible to go elsewhere. -- Robert Heinlein _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"