in reply to Re: Cron and Expect.pm
in thread Cron and Expect.pm

Going the other way, you can use RE (tilly) 3: Get default login environment in your cron jobs to make their environments match what you normally see when you are logged in.

Incidentally your script above is easy to write in Perl:

#! /usr/bin/perl %ENV = ( LOGNAME => $ENV{LOGNAME}, TERM => "dumb", HOSTTYPE => "i386", PATH => "/usr/bin:/bin", HOME => $ENV{HOME}, SHELL => "/bin/sh", OSTYPE => "Linux", SHLVL => 1, _ => "/usr/bin/env", ); exec("bash", "-noprofile", "-norc", @ARGV);
UPDATE: As pointed out by AM below, I was setting HOME twice. It makes more sense not to, so I've fixed that.

Replies are listed 'Best First'.
Re^3: Cron and Expect.pm
by Anonymous Monk on Nov 12, 2004 at 20:47 UTC
    Why is HOME set twice? Is it (so) important?
      theres no place like $HOME