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

G.W. Haywood bind at jubileegroup.co.uk
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:

8<-------------------------------------------------------------
#!/usr/bin/perl -w
# crazy_dig.pl: 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 'google.com' ) { print $crazy_text; }
# EOF: crazy_dig.pl
8<-------------------------------------------------------------

YMMV.

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

-- 

73,
Ged.


More information about the bind-users mailing list