This command will show the output of MX record:
dig @ns1.myname.com myname.com +short MX
and this will output A record:
dig @ns1.myname.com myname.com +short A
My question is how to output both A and MX with +short in one output display?
UPDATE: Cakemox this is the output I receive:
root@server1:~# dig +noall +answer @ns1.myname.com myname.com MX
myname.com. 86400 IN MX 10 ASPMX2.GOOGLEMAIL.COM.
myname.com. 86400 IN MX 10 ASPMX3.GOOGLEMAIL.COM.
myname.com. 86400 IN MX 1 ASPMX.L.GOOGLE.COM.
myname.com. 86400 IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
myname.com. 86400 IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
I was hoping I could get this kind of output with just one dig command and without separating with semicolon?
root@server1:~# dig @ns1.myname.com myname.com +short MX; dig @ns1.myname.com myname.com +short A
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
10 ASPMX2.GOOGLEMAIL.COM.
10 ASPMX3.GOOGLEMAIL.COM.
1 ASPMX.L.GOOGLE.COM.
63.98.113.202