Tuesday, August 30, 2016

Linux Bash Shell Script Expression Evaluation Examples


How the code below works:

This just an example of expression evaluation in different ways. Also equality and even odd checking in a different way.

Input:

It asks for an input to check if the number is even or odd.

Code for Expression Evaluation Example:

Save the code in a file named "ExpressionEvaluation.sh".

Running the Code:

Just type the code below in terminal. Make sure to cd into that directory if you have not opened the terminal in that directory.

bash ExpressionEvaluation.sh

No comments: