On 11/09/2011 10:14 AM, Peng Yu wrote:
variable assignment VAR=blah.

That sets up a bash-local variable. If you want it to be exported to the environment visible to child processes, then you _also_ need to use export, as in either:

VAR=blah
export VAR

or

export VAR=blah


However, VAR is not seen in env in /path/programtorun.sh (called from cron).

Right - bash maintains two sets of variables, and only the exported ones are visible to children.

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to