I have a list of IP in a CSV file and need to add aditional lines ie,
the file is set as such, site#,device#,IP,DefaultGW,Netmask
all sites have the last octet of the IP for 1st device as .10 I have duplicated the lines for device 1 as many times as the number of devices in each site, example above site 0033 has 3 devices as indicated by the Site#,device# values.
what I need is to be able to run a command that will cat the list and for each site (using S0033 as example) where the site has 3 devices and edit the device values to as per above 3 devices so the outcome should be as below.
I hope I have explainned enough to get some bash command help to update the list as the file contains over 1800 lines and manual edit will take me hours if not days.
Apreciate any help,