To check if the mentioned is present and if it is a directory Integer 1 is less than Integer 2 Numerically Integer 1 is equal to Integer 2 Numerically The string length is 0 or in other words, it is an empty string The string length should be greater than 0 Below listed are a few common operations which are widely used and hence become imperative to understand them as they constitute an important part. Now we are in a position to understand different operators supported by if conditions. This is to make sure that another person can easily understand the code and in cases of maintenance of the code, it is super easy when indented. Indentation is not essential for shell script but when it comes to best coding practice, it is always suggested to follow proper indentation. One thing we must be wary about is the indentation. This type of statement is for adding another if condition within the else block. This is a nested else if statement and acts more like the if else statement. If the condition is not satisfied one would feel like start climbing down the ladder and only stops if one condition is satisfied. This type of statement is more like a ladder. Starting from here, and the next type of if condition statement, the condition starts becoming branched. This type of statement is used when the program needs to check one condition and perform a task if the condition is satisfied or perform the other set of tasks if the condition is not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |