need help with awk '{print $1}'
by CyberIT from LinuxQuestions.org on (#5PTWS)
Good Evening!
I have this requirement that I need to print a certain portion of an SRV record and I could use some help on how to determine the section to print.
Code:
_mon._tcp.tax.ex.example.com has SRV record 0 5 3000 mdb-nkj.ex.example.com.I need to be able to capture and print to screen this portion of the record above.
Code:
exIs that even possible to do? I figured I could grep something and then start the printing from there??
Code:
echo _mon._tcp.tax.ex.example.com has SRV record 0 5 3000 mdb-nkj.ex2.example.com. | grep -w "record" | awk -F\. '{print $6}'Any help is much appreciated!
Thanks!
I have this requirement that I need to print a certain portion of an SRV record and I could use some help on how to determine the section to print.
Code:
_mon._tcp.tax.ex.example.com has SRV record 0 5 3000 mdb-nkj.ex.example.com.I need to be able to capture and print to screen this portion of the record above.
Code:
exIs that even possible to do? I figured I could grep something and then start the printing from there??
Code:
echo _mon._tcp.tax.ex.example.com has SRV record 0 5 3000 mdb-nkj.ex2.example.com. | grep -w "record" | awk -F\. '{print $6}'Any help is much appreciated!
Thanks!