Okay, so for example, here is what is inside one of the Node text files-
-80.0222 -81.3604 -83.2733 -87.9688 -86.7132 -82.938 -81.6501 -76.9167 -78.9644 -80.2246
-79.0461 -80.5249 -82.2464 -86.497 -85.8544 -82.4721 -81.4323 -77.8798 -80.7688 -80.987
-77.9511 -79.6907 -82.1187 -85.737 -84.9415 -81.189 -80.1036 -77.4193 -80.762 -81.287
-77.4729 -78.9058 -81.1581 -84.3832 -85.2848 -81.6571 -79.811 -77.7476 -81.1131 -81.4729
-77.2045 -78.5694 -80.4245 -84.6326 -85.4181 -81.7013 -79.8357 -78.016 -81.6587 -81.8589
The input would simply be the user inputting an integer from 1 to 10, which is stored as "userinput" and for now we'll say they input 3, for column 3.
I have a number attached to var1-3, var1 in this case being -86.4149, var2 being -79.6892, and var3 being 3.
I want to replace the values in column 3 in this file along with the other three node files by comparing the values in the column with the numbers attached to var1, var2, and var3. If the values in the column are less than var3 and greater than var1, replace the values in the column with "ttt"
If the values in the column are greater than or equal to var 3 and less than var2, replace the values in the column with "gcc"
So basically a desired result would be this in the case of this example-
-80.0222 -81.3604 ttt -87.9688 -86.7132 -82.938 -81.6501 -76.9167 -78.9644 -80.2246
-79.0461 -80.5249 ttt -86.497 -85.8544 -82.4721 -81.4323 -77.8798 -80.7688 -80.987
-77.9511 -79.6907 ttt -85.737 -84.9415 -81.189 -80.1036 -77.4193 -80.762 -81.287
-77.4729 -78.9058 ttt -84.3832 -85.2848 -81.6571 -79.811 -77.7476 -81.1131 -81.4729
-77.2045 -78.5694 ttt -84.6326 -85.4181 -81.7013 -79.8357 -78.016 -81.6587 -81.8589
Also I should note I made an error when referring to the Node files in that code. It should be Node{1..4}.txt not Node {1..4}.txt, the space there was an error on my part, my apologies.
Is this sufficient enough to get my idea across? If any more clarification is needed let me know. I apologize for my stupidity, I'm very new to bash scripting and this forum as well.