I have a $file which will be used as an input file for the script, pasting ie.
16 VDBDN084_K_TPVV016 SDBDN081 5:3:2 t 4313 273 4313 69077 3689 69077 2.0 2.1 16.0 13.5 5
16 VDBDN084_K_TPVV016 SDBDN081 4:3:3 t 4313 273 4313 69890 3679 69890 1.3 1.6 16.2 13.5 6
16 VDBDN084_K_TPVV016 SDBDN081 5:3:2 t 4097 182 4097 60396 2213 60396 2.0 2.1 14.7 12.2 5
16 VDBDN084_K_TPVV016 SDBDN081 4:3:3 t 4097 182 4097 59092 2184 59092 1.4 1.8 14.4 12.0 9
15 VDBDN084_K_TPVV015 SDBDN081 5:3:2 t 1082 626 1082 81584 7242 81584 5.6 3.9 75.4 11.6 0
15 VDBDN084_K_TPVV015 SDBDN081 4:3:3 t 1081 626 1081 82663 7261 82663 4.3 3.8 76.4 11.6 7
15 VDBDN084_K_TPVV015 SDBDN081 5:3:2 t 1002 634 1082 106008 9423 106008 5.7 3.9 105.8 14.9 2
initially I was counting duplicates on bases of second coulum and was using "sort $file |awk '{ print $2}'| uniq -c | sort -k1nr" in my script; but now there is a requirement and I have to count duplicate on basis of 2nd column and 4 column and also want to print the output of 2nd and 4th column.