November 2015
Beginner
282 pages
5h 5m
English
Similar to other programming languages, shell programming also supports various types of operators to perform tasks. Operators can be categorized as follows:
Equal to an operator (=) is the assignment operator that is used to initialize or change the value of a variable. This operator works on any data such as a string, integer, float, array, and so on. For example:
$ var=40 # Initializing variable var to integer value $ var="Hello" # Changing value of var to string value $ var=8.9 # Changing value of var to float value
Arithmetic operators are used for doing arithmetic operations on integers. They are as follows: