I need to write a Linux program, which reads portions of data from a csv file and write into a text file in the following pattern.
FROM= -100 -346 -249 -125
TO= -346 -249 -125 100
COLOR= COLOR1 COLOR2 COLOR3 COLOR4
NAME will be a fixed row,
FROM and TO information should be retreived from csv file and
COLOR information can be hard coded array of colors from program itself.
From csv data below, the first value(-100) under MIN will be the first value(-100) under FROM of text file. The last value(100) from excel MAX column will be the last value(100) under text file TO column. The values under VALUE column in excel will be rounded and used as TO and FROM per pattern shown.
Data,VALUE, 100,-345.8756, 200,-249.3654, 300,-125.3554, COUNT,MIN,MAX 1,-100,-98 93,84,86 98,94,96 99,96,98 100,98,100