Code:
cat qin.csv |head
17497.5,AT2G07765,20.31,17.27,5.46,10.02,5.7,19.33,11.18,0,0,3.13,0,4.09,5.46,10.02,5.7,19.33,11.18,0,0,3.13,0
9095.008264,AT1G29910,82.14,38.18,0,0,0,0,40.4,0,0,40.4,15.49,0,0,0,40.4,0,0,40.4,15.49,21.25,0
8093.269841,AT1G67090,82.14,0,11.83,0,0,0,26.35,51.84,0,0,0,0,0,26.35,0,51.84,0,0,0,0,0
7464.533333,AT1G29930,82.14,38.18,0,0,0,0,82.14,0,11.83,0,0,0,0,0,82.14,0,11.83,0,0,0,30.21
5402.863636,AT4G31280,67.65,0,0,0,0,9.66,0,0,9.66,0,0,0,0,0,0,9.66,0,9.66,9.66,0,0
5225.831933,AT1G29920,82.14,82.14,0,0,0,0,38.18,0,0,0,0,0,0,0,38.18,0,0,0,0,40.4,0
5110.942857,AT2G37830,16.66,0,0,0,0,0,3.13,0,0,7.11,0,0,0,0,0,3.13,0,0,7.11,0,0
5077.444444,AT4G22020,48.55,0,0,0,0,0,0,0,9.08,0,0,0,0,0,0,9.08,0,0,0,0,31.23
5070.434343,AT1G31580,81.62,44.88,0,4.2,0,0,0,0,0,0,0,4.2,0,0,0,0,0,0,0,0,0
4728.983333,AT1G54215,45.76,0,0,11.83,0,0,45.76,0,30.21,0,0,0,11.83,0,0,45.76,0,30.21,0,0,0
awk -F',' -v bound=300 'BEGIN { OFS = "," }
{
for(i=1; i<=NF; i++)
if ($i > bound) $i = bound
print
}' qin.csv |head
300,300,20.31,17.27,5.46,10.02,5.7,19.33,11.18,0,0,3.13,0,4.09,5.46,10.02,5.7,19.33,11.18,0,0,3.13,0
300,300,82.14,38.18,0,0,0,0,40.4,0,0,40.4,15.49,0,0,0,40.4,0,0,40.4,15.49,21.25,0
300,300,82.14,0,11.83,0,0,0,26.35,51.84,0,0,0,0,0,26.35,0,51.84,0,0,0,0,0
300,300,82.14,38.18,0,0,0,0,82.14,0,11.83,0,0,0,0,0,82.14,0,11.83,0,0,0,30.21
300,300,67.65,0,0,0,0,9.66,0,0,9.66,0,0,0,0,0,0,9.66,0,9.66,9.66,0,0
300,300,82.14,82.14,0,0,0,0,38.18,0,0,0,0,0,0,0,38.18,0,0,0,0,40.4,0
300,300,16.66,0,0,0,0,0,3.13,0,0,7.11,0,0,0,0,0,3.13,0,0,7.11,0,0
300,300,48.55,0,0,0,0,0,0,0,9.08,0,0,0,0,0,0,9.08,0,0,0,0,31.23
300,300,81.62,44.88,0,4.2,0,0,0,0,0,0,0,4.2,0,0,0,0,0,0,0,0,0
300,300,45.76,0,0,11.83,0,0,45.76,0,30.21,0,0,0,11.83,0,0,45.76,0,30.21,0,0,0