I want to print the out put of the dig command to a text file .
Any Command in shell can be redirected like this:
Example:
dig google.com > k.txt