in reply to Re^7: Read UNIX environment variable
in thread Read UNIX environment variable

How does it fail for you? Does sh pick up the correct environment? Maybe you set some environment variables in another rc file, or in .profile or .kshrc. Start some debugging.

Replies are listed 'Best First'.
Re^9: Read UNIX environment variable
by Anonymous Monk on Feb 09, 2011 at 14:48 UTC
    I don't get the email sent, I don't see an error message in the mailbox for the user cron is runing as. If I use the data dumper module and add print Dumper(\%ENV); to the code I can see the env vars when running it interactivly. Can you please let me know how I can debug this issue? Thanks

      The cron daemon usually sends the output of a program via mail to the owner submitting the job. Find out how to configure your cron daemon to do that, and/or consult with your system administrator how to modify your system setup to do this.

      Alternatively, write debugging information from your program to a file so you can see how your program progresses and what values it finds, and where.

        Thanks, problem solved. Sysadmins had locked the cron account.