On Wed, Jun 22, 2005 at 10:13:20AM +0200, Arno Lehmann wrote: .... > > Ok, what I remember: Incrementing and formatting at the same time was > not possible. I think Kern suggested some work-around with another > variable, where you do something like > newvar=+seqno > label=formatted newvar The manual doesn't give any indication that assignment to a variable is possible in the configuration file, or where such assignment would go. But....
This bug http://bugs.bacula.org/bug_view_advanced_page.php?bug_id=0000332 reports the problem and has this suggested solution: --------------------------------------- I just happened to stumble on the solution to your problem. It requires using two variables as follows: var ${tmpv:-${myctr+}} var ${tmpv:-${myctr}:p/6/1/r} myctr is a counter, and tmpv is just a dummy. If you don't get the idea from this, please ask the list. Here are a few more examples, but I'm not sure they really work. var ${tmpv:-${myctr+}:p/6/1/r} var ${tmpv:*${myctr+}:p/6/1/r} var ${tmpv:+${myctr+}:p/6/1/r} ------------------------------------ As far as I can tell, var is only a command for the console. So I'm trying this: Label Format = "Full${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}_${blankv:-${seqno+}:p/4/0/r}" I wonder if there is any quoting trick that doesn't require the second fake variable. I also wonder if it will complain about the non-existent variable. The reason I can't tell is that I'm hung up by another problem, which I'll put in a separate message. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users