I've set up a perl program to pull all of the files in a given directory and then
transfer them to a remote site. I have home defined in my /etc/hosts file, and the
scp2 command built by the perl program works from the command line. However, when I
run the program, the scp2 outputs to the screen as though I had only entered scp2
(i.e., it outputs the onscreen help).
Following is the program. I've verified that user jake can ssh2 to the remote site
without the necessity of a password.
Does anyone have any suggestions as to why this might not be working?
Thanks!
#!/usr/bin/perl
@files = `ls /music/bkup/*.gz`;
foreach $file (@files) {
# $FILE = '/music/bkup/$file';
push(@dir, $file);
}
foreach $DIR (@dir) {
system('scp2 -p -q $DIR jake@home:$DIR') or die "in foreach
can't put $DIR: $!\n";
}
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list