题解 | #打印每一行出现的数字个数#
打印每一行出现的数字个数
https://www.nowcoder.com/practice/2d2a124f98054292aef71b453e705ca9
awk '{n=gsub(/[1-5]/,"t");sum+=n;print "line"NR,"number:",n;}END{print "sum is",sum;}' nowcoder.txt
#数据仓库与数据分析实习#
打印每一行出现的数字个数
https://www.nowcoder.com/practice/2d2a124f98054292aef71b453e705ca9
awk '{n=gsub(/[1-5]/,"t");sum+=n;print "line"NR,"number:",n;}END{print "sum is",sum;}' nowcoder.txt
相关推荐