File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1+ 7/22/2001
2+ - Added the -q (print query) option to dig.
3+
147/19/2001
25 - A string tokenizer bug caused TXT records with one string to be
36 incorrectly parsed. (David Blacka)
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ public class dig {
6060 Record rec ;
6161 Record opt = null ;
6262 Resolver res = null ;
63+ boolean printQuery = false ;
6364
6465 if (argv .length < 1 ) {
6566 usage ();
@@ -156,6 +157,10 @@ public class dig {
156157 (byte )0 , Flags .DO );
157158 break ;
158159
160+ case 'q' :
161+ printQuery = true ;
162+ break ;
163+
159164 default :
160165 System .out .print ("Invalid option" );
161166 System .out .println (argv [arg ]);
@@ -173,6 +178,8 @@ public class dig {
173178 query = Message .newQuery (rec );
174179 if (opt != null )
175180 query .addRecord (opt , Section .ADDITIONAL );
181+ if (printQuery )
182+ System .out .println (query );
176183 response = res .send (query );
177184
178185 if (type == Type .AXFR )
You can’t perform that action at this time.
0 commit comments