用 bash 算費氏數列,就當了 - Linux

By Jack
at 2016-04-23T21:12
at 2016-04-23T21:12
Table of Contents
無聊用各種方式實現費式數列,
然後用到了 bash 。
然後就當機了!
是寫在 .bashrc 裡。
source 了一次之後就有點頓,然後越來越頓。
我有一次 top 成功過,bash 吃的資源比 firefox 還多。
然後我連動個滑鼠都有問題, Ctrl Alt F2 竟然沒反應。
最後螢幕變雪花,強制關機。
當機應該和 bash 中用了遞迴有關,程式碼如下:
````````````````
febo(){
i=$1
(( j = i-1 , k = i-2 ))
if (( i <= 1 ))
then
echo 1
else
echo $(expr `febo $j` + `febo $k` )
fi
}
`````````````````
現在重開機了,有什麼要注意的嗎?
Fedora23 X LXDE ,開機過程沒有特別的訊息。
(我之前 ubuntu 斷電過一次,開機過程有顯示修復的訊息。)
--
sent from mySQL.
--
※ 發信站: 夢之大地 (ccns.cc), 來自: 140.116.249.140
※ 文章網址: telnet://ccns.cc/
推 foo:這作者……02/30 22:66
推 void:奇文共賞!!02/30 28:19
--
Tags:
Linux
All Comments

By Madame
at 2016-04-24T22:04
at 2016-04-24T22:04

By William
at 2016-04-27T10:37
at 2016-04-27T10:37

By Leila
at 2016-04-27T16:16
at 2016-04-27T16:16

By Hardy
at 2016-04-27T22:01
at 2016-04-27T22:01

By Audriana
at 2016-04-29T04:13
at 2016-04-29T04:13

By Sandy
at 2016-04-29T12:06
at 2016-04-29T12:06

By Joe
at 2016-05-04T11:22
at 2016-05-04T11:22

By John
at 2016-05-08T20:05
at 2016-05-08T20:05

By Robert
at 2016-05-09T09:26
at 2016-05-09T09:26

By Franklin
at 2016-05-11T18:49
at 2016-05-11T18:49

By Harry
at 2016-05-12T01:46
at 2016-05-12T01:46

By Yedda
at 2016-05-13T08:10
at 2016-05-13T08:10

By Aaliyah
at 2016-05-15T17:12
at 2016-05-15T17:12

By Necoo
at 2016-05-20T11:09
at 2016-05-20T11:09

By Agnes
at 2016-05-22T16:52
at 2016-05-22T16:52

By Rae
at 2016-05-26T01:48
at 2016-05-26T01:48
Related Posts
遠端ssh連線回傳畫面問題

By Sarah
at 2016-04-23T07:59
at 2016-04-23T07:59
nginx設定問題

By Yedda
at 2016-04-23T00:22
at 2016-04-23T00:22
黑蘋果+ubuntu雙系統

By Ina
at 2016-04-22T22:25
at 2016-04-22T22:25
用shell script下載檔案

By Odelette
at 2016-04-22T17:51
at 2016-04-22T17:51
Debian 系統 使用者無法登入

By Catherine
at 2016-04-22T09:30
at 2016-04-22T09:30