[oldboy@student ~]$ seq 100 |awk '{total+=$1} END {print total}'
5050
[oldboy@student ~]$ seq 100 |awk '{total=total+$1} END {print total}'
5050[oldboy@student ~]$ seq 100 |awk '{total+=$1} END {print total}'
5050
[oldboy@student ~]$ seq 100 |awk '{total=total+$1} END {print total}'
5050
awk "BEGIN{for(i=1;i<=100;i++)sum=sum+i;print sum}"
1-100 achieve and print command
Guess you like
Origin blog.csdn.net/weixin_34204057/article/details/90928935
Recommended
Ranking