git://git.jankratochvil.net
/
harpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support interfaces name expansion syntax: eth{0-1}.{2-24}
[harpy.git]
/
harpy
diff --git
a/harpy
b/harpy
index
cb02bd2
..
1c314e1
100755
(executable)
--- a/
harpy
+++ b/
harpy
@@
-183,7
+183,13
@@
my($msg)=@_;
my %socks;
my %socks;
-for my $ifname (@ARGV) {
+my @ifnames=@ARGV;
+while (@ifnames) {
+ my $ifname=shift @ifnames;
+ if ($ifname=~/{(\d+)-(\d+)}/) {
+ push @ifnames,$`.$_.$' for $1..$2;
+ next;
+ }
my($sock,$hw)=sock($ifname);
$socks{$ifname}={
"sock"=>$sock,
my($sock,$hw)=sock($ifname);
$socks{$ifname}={
"sock"=>$sock,