我有一个像这样的文件:
A 50.40,60.80,56.60,67.80,51.20,78.40,63.80,64.2
B 37.40,37.40,38.40,38.80,58.40,58.80,45.00,44.8
.
.
.
我想打印第 2 列中的所有值都超过 50 的那些行
输出:
A 50.40,60.80,56.60,67.80,51.20,78.40,63.80,64.2
我试过了:
cat file | tr ',' '\t' | awk '{for (i=2; i<=NF; i++){if($i<50) continue; else print $i}}'