Your assignment is to login into cop3353.org and write a script fib.sh that computes the Fibonacci sequence (OEIS A000045).
Your script should accept a single command line argument. This argument will be the length of the Fibonacci sequence to compute. Call that value "COUNT".
Your script should compute all of the Fibonacci numbers from fibonacci(0) to fibonacci(COUNT-1).
Your output should look like:
COP4342_test@(none):~$ ./fib.sh 10 fibonacci(0) = 0 fibonacci(1) = 1 fibonacci(2) = 1 fibonacci(3) = 2 fibonacci(4) = 3 fibonacci(5) = 5 fibonacci(6) = 8 fibonacci(7) = 13 fibonacci(8) = 21 fibonacci(9) = 34 COP4342_test@(none):~$ ./fib.sh 100 fibonacci(0) = 0 fibonacci(1) = 1 fibonacci(2) = 1 fibonacci(3) = 2 fibonacci(4) = 3 fibonacci(5) = 5 fibonacci(6) = 8 fibonacci(7) = 13 fibonacci(8) = 21 fibonacci(9) = 34 fibonacci(10) = 55 fibonacci(11) = 89 fibonacci(12) = 144 fibonacci(13) = 233 fibonacci(14) = 377 fibonacci(15) = 610 fibonacci(16) = 987 fibonacci(17) = 1597 fibonacci(18) = 2584 fibonacci(19) = 4181 fibonacci(20) = 6765 fibonacci(21) = 10946 fibonacci(22) = 17711 fibonacci(23) = 28657 fibonacci(24) = 46368 fibonacci(25) = 75025 fibonacci(26) = 121393 fibonacci(27) = 196418 fibonacci(28) = 317811 fibonacci(29) = 514229 fibonacci(30) = 832040 fibonacci(31) = 1346269 fibonacci(32) = 2178309 fibonacci(33) = 3524578 fibonacci(34) = 5702887 fibonacci(35) = 9227465 fibonacci(36) = 14930352 fibonacci(37) = 24157817 fibonacci(38) = 39088169 fibonacci(39) = 63245986 fibonacci(40) = 102334155 fibonacci(41) = 165580141 fibonacci(42) = 267914296 fibonacci(43) = 433494437 fibonacci(44) = 701408733 fibonacci(45) = 1134903170 fibonacci(46) = 1836311903 fibonacci(47) = 2971215073 fibonacci(48) = 4807526976 fibonacci(49) = 7778742049 fibonacci(50) = 12586269025 fibonacci(51) = 20365011074 fibonacci(52) = 32951280099 fibonacci(53) = 53316291173 fibonacci(54) = 86267571272 fibonacci(55) = 139583862445 fibonacci(56) = 225851433717 fibonacci(57) = 365435296162 fibonacci(58) = 591286729879 fibonacci(59) = 956722026041 fibonacci(60) = 1548008755920 fibonacci(61) = 2504730781961 fibonacci(62) = 4052739537881 fibonacci(63) = 6557470319842 fibonacci(64) = 10610209857723 fibonacci(65) = 17167680177565 fibonacci(66) = 27777890035288 fibonacci(67) = 44945570212853 fibonacci(68) = 72723460248141 fibonacci(69) = 117669030460994 fibonacci(70) = 190392490709135 fibonacci(71) = 308061521170129 fibonacci(72) = 498454011879264 fibonacci(73) = 806515533049393 fibonacci(74) = 1304969544928657 fibonacci(75) = 2111485077978050 fibonacci(76) = 3416454622906707 fibonacci(77) = 5527939700884757 fibonacci(78) = 8944394323791464 fibonacci(79) = 14472334024676221 fibonacci(80) = 23416728348467685 fibonacci(81) = 37889062373143906 fibonacci(82) = 61305790721611591 fibonacci(83) = 99194853094755497 fibonacci(84) = 160500643816367088 fibonacci(85) = 259695496911122585 fibonacci(86) = 420196140727489673 fibonacci(87) = 679891637638612258 fibonacci(88) = 1100087778366101931 fibonacci(89) = 1779979416004714189 fibonacci(90) = 2880067194370816120 fibonacci(91) = 4660046610375530309 fibonacci(92) = 7540113804746346429 fibonacci(93) = -6246583658587674878 fibonacci(94) = 1293530146158671551 fibonacci(95) = -4953053512429003327 fibonacci(96) = -3659523366270331776 fibonacci(97) = -8612576878699335103 fibonacci(98) = 6174643828739884737 fibonacci(99) = -2437933049959450366 COP4342_test@(none):~$
Please don't worry about overflow for Fibonacci numbers greater than or equal to 93 unless you would like to.
Also, you may not use any other programming language for this exercise, including such calculator languages as "bc", "dc", or "gp". This exercise must be done solely use Bash constructs.
You may do as much (or as little) argument checking as you like. It's not required for this exercise, but it's always a good idea.
Please have this available by the beginning of class on Friday, April 5.