你如何用科学记数法传递awk变量

时间:2015-10-05 15:26:55

标签: linux variables awk

我正在尝试将几个变量传递给awk命令,其中一个我似乎无法通过,因为它是科学记法,如下所示:

PatientCategory.Code

这有效:

r=20 # This is a column in the file I would like to print if the condition is true (if the first column is less than the value specified in $a)
a=1e-012

这不是:

awk -v r=$r '{OFS=FS="\t"} {if ($1 < 1e-012) print $r}' file.txt

如何确保正确传递此变量?

感谢您的帮助

0 个答案:

没有答案