Append a Hard-coded Text Tuple into Additional Section of "dig" Feature

G.W. Haywood bind at
Wed Jun 15 20:55:56 UTC 2016

Hi there,

On Wed, 15 Jun 2016, Jun Xiang X Tee wrote:

> ...
> I wish to append a hard-coded text tuple into end of the section. 
> ...

I think what you want to do sounds strange, but if I wanted to do
something like that I would not modify an existing perfectly good
utility.  I would create a new one:

#!/usr/bin/perl -w
# Sometimes adds crazy text to the output of dig.
use strict;
my $crazy_text = "----------\nCrazy text\n----------\n";
print qx |/usr/bin/dig $ARGV[0]|;
if( $ARGV[0] eq '' ) { print $crazy_text; }
# EOF:


Don't do stuff like this without thinking about it Really Hard.
Probably not even then.



More information about the bind-users mailing list