Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
我将使用gnu awk进行此任务以下方式,让file.txt
awk
file.txt
-1.3 -2.00 -3.00 4.00 9.00 0.10 -0.20 -0.80 4.50 1.70 0.00 -3.40 -6.80 5.60 9.30 -0.4 -3.20 -4.70 0.80 -0.9 1.03 -2.00 -3.00 4.00 9.00 0.00 -6.80 -9.30 3.40 5.60 0.00 -4.70 -0.80 8.90 -0.3
进行
awk '!($1=="0.00")' file.txt
输出
-1.3 -2.00 -3.00 4.00 9.00 0.10 -0.20 -0.80 4.50 1.70 -0.4 -3.20 -4.70 0.80 -0.9 1.03 -2.00 -3.00 4.00 9.00
说明:单个条件只需描述您想要的行:不(>) !)第一个字段($ 1)为(==)字符串0.00(“ 0.00” )
>) !
$ 1
==
0.00
“ 0.00”
(已测试Gawk 4.2.1)
I would use GNU AWK for this task following way, let file.txt content be
AWK
then
gives output
Explanation: single condition just describe lines which you want: not (!) first field ($1) is (==) string 0.00 ("0.00")
!
$1
"0.00"
(tested in gawk 4.2.1)
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
我将使用gnu
awk
进行此任务以下方式,让file.txt
进行
输出
说明:单个条件只需描述您想要的行:不(
>) !
)第一个字段($ 1
)为(==
)字符串0.00
(“ 0.00”
)(已测试Gawk 4.2.1)
I would use GNU
AWK
for this task following way, letfile.txt
content bethen
gives output
Explanation: single condition just describe lines which you want: not (
!
) first field ($1
) is (==
) string0.00
("0.00"
)(tested in gawk 4.2.1)