There are a few ways to do math calculations in bash. The first option is to use the Linux command expr. we can use this command to do the simple math calculation like addition, subtraction, multiplication, and division. we use the following signs, + for addition, - for subtraction, \* for multiplication, / for division. We … Continue reading Bash math calculation 1
In Linux bash shell, the commands that we execute are recorded and saved in the .bash_history file in our home directory. we can use up and down arrow to move back and forward in the command history. We can also use the command history to see all recorded previous command.
In bash in order to set a variable, you can just use the equal sign '='.So you write the variable name, equal sign, and its value. It is important not to have a space between the variable name and the equal sign. When we want to access the variable then we use dollar sign '$'. … Continue reading Bash variables 1