> > Any suggestion how to implement that with perl?
> 
> 
> How about that?
> 
>     my $format = "Resource %(res)s has size %(size)sKB.";
>     my $args = { 'res' => "resource_0", 'size' => "20411" };
> 
>     my $loc_fmt = _($format);
> 
>     my @args = ();
>     push @args, $args->{$1} // "" while $loc_fmt =~ s,\%\((\w+)\),%,;

But this only implements a subset of python format features, so the question is
if drbdadmin restricts itself to this subset?

_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to