


‘ If-then-else’ and ‘ case’ statements are mainly used for implementing condition statements in any programming language. Like another programming language, you can use conditional statement in bash. If you want to know more about bash variables then you can check this tutorial.

The above command is executed for two times with the value 56 and 100. Here, ‘#’ symbol is used for adding a single-line comment and single quote (‘) with ‘:’ is used for adding multiple-lines comments. Create a bash file with the following script to know the use of bash comment. How you can add single-line and multiple-lines comments in a bash script is shown in this part. You can add a comment in multiple ways in bash script. The reader can understand any code properly if the code is well commented. The comments are not parsed with the script at the time of execution. Returning return codes from a script and catching in another scriptĪdding comments with the code is an essential part of any programming language.If you are new in bash programming then this tutorial is for you. Any user can learn this scripting language very easily and quickly. These daily tasks can be automated by using a bash script. We need to run many commands in Linux on a daily basis for many purposes. The default command language of Linux is Bash script.
