In message <1e4079388e04544fa3ffa6a900d6fb65015d7...@exchange.vplsnet.net>, "Ta
kahiro Masuda" writes:
> Hi I was trying to get the $generate directive to work like so=20
> 
> 11 IN PTR 14.cool.com.
> 
> ....
> 
> 30 IN PTR 33.cool.com.
> 
> $GENERATE 11-30  ${3,0,d} PTR $.COOL.COM.

        Which doesn't match what you wanted to do.
 
> I've read the manual here =
> http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#id2566761---
> 
> Syntax: $GENERATE range lhs [ttl] [class] type rhs [ comment ]
> 
> lhs describes the owner name of the resource records to be created. Any =
> single $ symbols within the lhs side are replaced by the iterator value. =
> To get a $ in the output you need to escape the $ using a backslash \, =
> e.g. \$. The $ may optionally be followed by modifiers which change the =
> offset from the iterator, field width and base. Modifiers are introduced =
> by a { immediately following the $ as ${offset[,width[,base]]}. e.g. =
> ${-20,3,d} which subtracts 20 from the current value, prints the result =
> as a decimal in a zero padded field of with 3. Available output forms =
> are decimal (d), octal (o) and hexadecimal (x or X for uppercase). The =
> default modifier is ${0,0,d}. If the lhs is not absolute, the current =
> $ORIGIN is appended to the name.
> 
> For compatibility with earlier versions $$ is still recognized a =
> indicating a literal $ in the output.
> 
> ---
> 
> The tricky part is ${3,0,d} waas not working. I bumped into a site that =
> stated $GENERATE range rhs type lhs
> 
> I then tried $GENERATE 11-30  $ PTR ${3,0,d}.COOL.COM. and this worked.
> 
> Hopefully this will help somebody.
> 
> Anybody here have the ability to update the manual?

        ${3,0,d} works on both the left hand side and the right hand side.
        The same code is called to process both the lhs and the rhs.

        Mark
 
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: mark_andr...@isc.org
_______________________________________________
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to