I have a file structured like this:
[IP ADRESS], [ID-Number], [Name] [IP ADRESS], [ID-Number], [Name] [IP ADRESS], [ID-Number], [Name] ...
(The actual values are not in brackets)
How do I get (print) a specific value (either IP-Adress, ID or Name) while looping through the lines (preferably with 'sed' since I already started looking into that)?
My objective is to send an SSH command to each server by grabbing the IP Address with a script, and then having the ID Number and Name for another program which displays the output of each command in combination with the name (I'm trying to build a monitoring service for our servers). So I need to be able to only grab one or two of those values.