Y
yezi
Dear ALl:
The program now is following:
#!/usr/bin/perl
use warnings;
use strict;
my $filename;
my $cmdline;
$filename="/home/binye/test_perl/testdownload.txt";
open( FILE, "< $filename" ) or die "Can't open $filename : $!";
while( <FILE> ) {
print "Processing wget.";
my $cmdline="wget -w 50 -q http://$_ & tcpdump -c 20 -i eth0 src host
$_ -w $_.dmp ";
system($cmdline);
print "done ...w $_..";
}
close FILE;
I try to run it, by using the & the waring message is :
syntax error near unexpected token `&'
sh: -c: line 2: ` & tcpdump -c 20 -i eth0 src host www.cron.com'
Then I exchange the & to \$, still same problem.
So I donot know how to make the program works now. Thanks for any
comments
The program now is following:
#!/usr/bin/perl
use warnings;
use strict;
my $filename;
my $cmdline;
$filename="/home/binye/test_perl/testdownload.txt";
open( FILE, "< $filename" ) or die "Can't open $filename : $!";
while( <FILE> ) {
print "Processing wget.";
my $cmdline="wget -w 50 -q http://$_ & tcpdump -c 20 -i eth0 src host
$_ -w $_.dmp ";
system($cmdline);
print "done ...w $_..";
}
close FILE;
I try to run it, by using the & the waring message is :
syntax error near unexpected token `&'
sh: -c: line 2: ` & tcpdump -c 20 -i eth0 src host www.cron.com'
Then I exchange the & to \$, still same problem.
So I donot know how to make the program works now. Thanks for any
comments