[TriLUG] Perl question
William Sutton
william at trilug.org
Sat Mar 14 00:12:12 EDT 2009
I, um, "expect" that this is too late, but
eval {
$ssh = Expect->spawn("ssh -l $username $ip") || die "didn't work: $!\n";
};
next if $@;
William Sutton
On Fri, 13 Mar 2009, Greg Brown wrote:
> Can anyone help me out what this will work:
>
> $ssh = Expect->spawn("ssh -l $username $ip") || die "didn't work: $!\n";
>
> but this will NOT work:
>
> $ssh = Expect->spawn("ssh -l $username $ip") || next;
>
> nor will this
>
> next if (not $ssh = Expect->spawn("ssh -l $username $ip"));
>
> I'd really REALLY like to have the failures skip to the next one.. I've got
> over 1000 routers to update tonight via this script and it's killing me
> stopping ever 5 or so because TACACS isn't properly configured (or whatever
> the malady is).
>
> Any help would be greatly appreciated!!
>
> Greg
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ : http://www.trilug.org/wiki/Frequently_Asked_Questions
>
More information about the TriLUG
mailing list