Tests and BranchingThere are various tests that will produce either zero (which means success or true) or not zero (which usually means failure or false). Here is an example:
The command if means that what follows will set the condition to true or false. The open bracket means that what follows (up to the close bracket) is a test. the -f means that the kind of test is whether what follows is a regular file. Then we have a path to a file. The semicolon ends the if command, so the then command begins what to do if condition was true. The else command begins what to do if the condition was false. The fi command (if, backwards) ends the original if command.
|
This page is This page rendered by CodeIgniter in 0.0189 seconds. |