WhiteHatCyberus / Sum-of-odd-even-using-Bash-shell-scripting

Bash Shell Script for a program to calculate the sum of odd and even elements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find the sum of odd and even element from a array using Bash Shell Scripting

Bash Shell Script for a program to calculate the sum of odd and even elements

Introduction

• As a computer science BTech student I went across the net to learn more about sh, but could'nt find a proper code for this program, so I made my own from scratch and as simple and minimal as possible, hope this helps you guys a lot for your education and practical lab purposes
• The speciality of this code, unlike other codes, you add the elements into the array after runtime.
• To facilitate better readability of code, I've added necessary comments in the code to simulate the flow of control in the code

The better - sumoe.sh

Screenshot 2022-10-02 205701

OUTPUT

Screenshot 2022-10-02 211519

The original - sumevenodd.sh

Screenshot 2022-10-02 211519

OUTPUT

Screenshot 2022-10-02 205701

About

Bash Shell Script for a program to calculate the sum of odd and even elements

License:MIT License


Languages

Language:Shell 100.0%