Reading Text and Change Numbers inside
I am not sure if maxscript can handle reading large text files but I was just wondering If someone can help me with writing a script.
I have a text file that has multiple lines like this:
76 89 100 4 brown y apple
33 49 121 5 yellow t1 xyz
33 49 121 8 blue any nt
I would like to read this file find the min and max of the 4th column
(the columns with values: 4,5,8...)
and re write the text file with a new 4th column that has values of original 4th column+average of min and max of the whole range).
in my case if average is 6 then the new text file should look like this:
76 89 100 10 brown y apple
33 49 121 11 yellow t1 xyz
33 49 121 14 blue any nt
The text file has space in between data, would that work If It had "," between data in each row?
Thanks for your help..