-
Book Overview & Buying
-
Table Of Contents
Linux Essentials - Second Edition
By :

Scripting languages support several types of conditional expressions. These enable a script to perform one of several actions contingent on a particular condition—typically the value of a variable. One common command that uses conditional expressions is if, which allows the system to take one of two actions depending on whether a certain condition is true. The if keyword’s conditional expression appears in brackets after the if keyword and can take many forms. For instance, -f file is true if file exists and is a regular file; -s file is true if file exists and has a size greater than 0; and string1 == string2 is true if the two strings have the same values.

Conditionals may be combined together with the logical and (&&) or logical or (||) operators. When conditionals are combined with &&, both sides of the operator must be true for the condition as a whole to be true. When || is used, if either side of the operator is true...
Change the font size
Change margin width
Change background colour