Let's now understand the
Let's learn the following example to check the content or value of expressions:
$ test $name = Ganesh
$ echo $?
0 if success and 1 if failure.
In the preceding example, we want to check if the content of the variable name is the same as
? To check this, we have used the
test command. The
test will store the result of the comparison in the
We can use the following syntax for the preceding
test command. In this case, we used
[ ] instead of the
test command. We've enclosed the expression to be evaluated in square brackets:
$ [[ $name = Ganesh ]] # Brackets replace the test command
$ echo $?
During the evaluation ...
Rotating Hydraulic Cylinder Exporters Flame Retardant Knit Fabric 36 Cell Solar Panel Cast aluminum furniture parts high voltage cable wholesale fruit powder tempered float glass Different Kinds of Camping Chairs Wholesale Camping Chairs rubber oil seal nitrile cleanroom gloves Mercedes Benz Brake Discs and Pads scuba mask wholesale Wholesale 104 Holes Plant Starter Trays for sale Achromatic Lens Aromasin Powder