The file named ip-by-country.csv contains a report of IP address ranges by country. Each line in the file is comma separated and has the following format:
[begin IP Addr],[end IP Addr],[begin IP Nbr],[end IP Nbr],[Cntry Code],[Cntry Name]
Your task is to list all of the IP address ranges that are assigned to the United States. The list should reside in an output text file named filtered.csv.
Write a program that reads in the data from ip-by- country.csv, line by line. If the country code on the line matches "US", then write the entire line to the output file. You may output the line to the Console in addition to the file, but that is optional.
[begin IP Addr],[end IP Addr],[begin IP Nbr],[end IP Nbr],[Cntry Code],[Cntry Name]
Your task is to list all of the IP address ranges that are assigned to the United States. The list should reside in an output text file named filtered.csv.
Write a program that reads in the data from ip-by- country.csv, line by line. If the country code on the line matches "US", then write the entire line to the output file. You may output the line to the Console in addition to the file, but that is optional.