The first column is several file names in my directory and second column a number to detect some of them which is greater than 80%. So, I want to get the file names in the first column which are greater than 80%. How can I do that?
That is a tiny bit too simple. Since $2 expands to a string containing a non-numeric character (the percent sign), the comparison will be a string comparison instead of a numeric comparison. Therefore, input like:
20140521_162154basd.r 9.3%
will also print the (unwanted) filename and the input:
20140521_162154basd.r 100.0%
will not print the desired filename. With the slight modification: