shell的awk中用if..else,怎么多条件嵌套
下面是我写的awk中多条件语句,总是在第2个print语句显示语法错误cat$path/zliu_ciliu5.txt|awk'{if($5>=0.2&&$4!=0){p...
下面是我写的awk中多条件语句,总是在第2个print语句显示语法错误
cat $path/zliu_ciliu5.txt|awk '{if($5>=0.2&&$4!=0){print $0,"1"}elseif($5<=0.05||$4==0){print $0,"4"}elseif($7>=0.3&&$6>=0.5&&$3>=0.2&&$4>=0.03){print $0,"2"}else{print $0,"3"}}' 展开
cat $path/zliu_ciliu5.txt|awk '{if($5>=0.2&&$4!=0){print $0,"1"}elseif($5<=0.05||$4==0){print $0,"4"}elseif($7>=0.3&&$6>=0.5&&$3>=0.2&&$4>=0.03){print $0,"2"}else{print $0,"3"}}' 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询