sub copyover { $scp=Expect->spawn("/usr/bin/scp ${srcpath}/$file $who:${destpath} +/$file"); $scp->expect(30,"ssword: ") || die "Never got password prompt from + $dest:$!\n"; print $scp 'password' . "\n"; $scp->expect(30,"-re",'$\s') || die "Never got prompt from parent +system:$!\n"; $scp->soft_close(); return; }
In reply to expect w/scp by birdbrane
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |