|Come for the quick hacks, stay for the epiphanies.
Get default login environmentby tilly (Archbishop)
|on Sep 22, 2000 at 17:05 UTC
Unix crons often run into problems with an incorrectly set environment that causes the same script which works fine for you to break when used in the cron.
Under the assumption that you don't have a bizarre default login environment (eg = in the variable names or returns in the values) and your standard shell is bash, the following snippet demonstrates how you could load the default values from your login environment into your current, without losing other values that might have been passed in your cron.