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

Thanks very much for the help, robartes (++). Here's what I came up with, in case anyone should read this thread and want to know the (quick & dirty, at least) solution:

sudo sh -c 'printf "\n" | sh /usr/local/scripts/pre_backup.sh'

I'm still interested if there's an actual way to do it with the Expect.pm module (making this a bit more perl-relevant), so if anyone is clued, a heads-up would be fantastic.

Thanks again,
scott.

Replies are listed 'Best First'.
Re^3: Expect.pm and sudo.
by Aristotle (Chancellor) on Oct 17, 2002 at 01:59 UTC
    printf "\n"? That's the same as a simple echo, no?

    Makeshifts last the longest.