#!/bin/bash
#在进行数值计算时使用((...))实现C语言风格的循环很方便
((i=0,s=0))
#使用直到型循环
until ((i==100));do ((i++,s+=i));done
echo sum\(1..100\)=$s
shell编程之使用C语言风格的表达式计算1~100的和值
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
No more authentication methods to try,Permission denied (publickey)
the5fire
2023-11-21 09:53:05
linux有磁盘空间却显示不足 linux中inode使用率过高处理办法 linux中inode使用率过高处理办法
故宮博物院
2022-12-25 14:18:39
Unixbench:简介及使用【转】
張昺華-sky
2022-06-30 14:35:50
Red Bull Racing suspends junior driver Juri Vips after racist slur on live gaming stream
alterego5352
2022-06-23 04:59:35
Point of Sale (POS) Terminal Market Will Grow in Near Future 2030
chhidami.a.msg
2022-06-17 18:58:03
台湾海峡不是“国际水域” 解放军会否采取更多措施对抗扰台外军?
mugiseki2710
2022-06-15 18:10:39
Justin Bieber reveals facial paralysis after shows cancelled
alterego5352
2022-06-11 23:46:31
Champions League: French police looked for problems, says Liverpool mayor
alterego5352
2022-06-10 02:24:14
iuhfgdser rtyuijnhbgfd
fikik75972
2022-06-08 00:30:29
Home Water Filtration Systems Market Future Witness Significant Growth by 2030
chhidami.a.msg
2022-06-07 22:13:50
新竹外/约濑tea232新竹茶庄超过百位精选美女 每日不定时兼职上班
lan520an109
2022-06-07 19:45:54
sdfghjmnbvcx cter trewtretre
mufajiqe
2022-06-06 04:27:43
yujhfgd rthgfbvxytre
fikik75972
2022-06-02 15:49:30
由于小维尼修斯和库尔图瓦,皇马击败利物浦赢得第14个冠军联赛冠军
aridalton69
2022-05-29 21:51:56
无预警风控?!九州LEO、THA有卦吗?
momowqaz
2022-05-26 18:09:50