We can also write it like (Simple web server) this: if
We can also write it like this: if [ -f fred.c ] then… fiThe testcommand s exit code (whether the condition is satisfied) determines whether the conditionalcode is run. Note that you must put spaces between the [braces and the condition being checked. You can rememberthis by remembering that [is just the same as writing test, and you would always leave a space after If you prefer putting thenon the same line as if, you must add a semicolon to separate the test from if [ -f fred.c ]; then… fiThe condition types that you can use with the testcommand fall into three types: string comparison, arithmetic comparison, and file conditionals. The following three tables describe these condition types. String ComparisonResultstring1 = string2True if the strings are equal. string1 != string2True if the strings are not equal. -n stringTrue if the string is not null. -z stringTrue if the string is null (an empty string). Arithmetic ComparisonResultexpression1 -eq expression2True if the expressions are equal. expression1 -ne expression2True if the expressions are not equal. expression1 -gt expression2True if expression1is greater than expression2. expression1 -ge expression2True if expression1is greater than or equal toexpression2. expression1 -lt expression2True if expression1is less than expression2. expression1 -le expression2True if expression1is less than or equal toexpression2. ! expressionTrue if the expression is false, and vice versa.
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp web hosting services