Allow multiple commands separated by , in mesh/rf

This commit is contained in:
Stefan `Sec` Zehl 2012-05-19 18:20:53 +02:00
parent d5f23f147b
commit a2ac676134
1 changed files with 12 additions and 0 deletions

View File

@ -73,6 +73,17 @@ $r0ket::verbose=1;
my @fh; my @fh;
my $read; my $read;
my @args=@ARGV;
my $sidx=0;
for my $eidx (0..$#args){
if($args[$eidx] eq ","){
dwim(@args[$sidx..$eidx-1]);
$sidx=$eidx+1;
}
};
dwim(@args[$sidx..$#args]);
sub dwim{
my $cmd=shift; my $cmd=shift;
if($cmd =~ /^r/){ if($cmd =~ /^r/){
@ -271,6 +282,7 @@ if($cmd =~ /^r/){
}else{ }else{
die "Option not understood\n"; die "Option not understood\n";
}; };
};
#if (@fh = $sel->can_read(10)) { #if (@fh = $sel->can_read(10)) {
# sysread($fh[0],$read,1024); # sysread($fh[0],$read,1024);