Linux Boot Loader Features of Bash Shell
It is very easy to learn bash shell scripting. There are different Unix shells like bash, ksh, zsh, sh etc. Please make sure that which shell do you want to use while running the script, because syntax of each shell might be different. Before going to develop shell script, your logic or flow of the script should be clear then only you can develop shell script very easily. It is very important to have clear understanding of when or where not to use shell script.
For Fibonacci series shell script, need to know the exact number series. It will be as :
1 1 2 3 5 8 13 21 34 etc.
Please see below is the script to get desired output.
######################Fibonacci.sh###############################
echo "How many numbers do you want of Fibonacci series ?"
read total
x=0
y=1
i=2
echo "Fibonacci Series up to $total terms :: "
echo "$x"
echo "$y"
while [ $i -lt $total ]
do
i=`expr $i + 1 `
z=`expr $x + $y `
echo "$z"
x=$y
y=$z
done
Click to
know more about: Difference of Linux and Unix
|
Hello There,
ReplyDeleteZoooooooom! That’s how speedy and easy this read was! Looking forward to more of such powerful content on Difference of Linux and Unix!
I read V7 Unix introduced the first version of the modern Standard I/O library studio as part of the system library. The next implementations increased the number of libraries significantly. Doesn't it adds overhead of loading unused libraries?
But nice Article Mate! Great Information! Keep up the good work!
Best Regards,
Preethi