Web hosting ratings - Each element in the loop is separated from

Each element in the loop is separated from the next by white space. For that reason, you should be careful if you are directing output of a command to use as your LIST. As soon as the for loop sees a space or a tab, it runs the loop on it. For example, if you direct the output of the ls command to the loop, the loop evaluates each filename separately. However, if you use the output of ls -l, the loop also evaluates every other piece of information in the list (such as file owner, permission bits, and so on) something that you probably don t want to do. The if . . . then test loop Another common loop is constructed by testing variables within an if statement. The possible variations of an if . . . then test loop are shown here: if [ expression ] then { body } fi if [ expression ] then { body } else { body } fi if [ expression ] then { body } elif [ expression ] then { body } else { body } fi In this type of loop, each of the expressions is tested. Based on the results of that test, one of the actions that follow is taken. Table 12-3 lists the possible test expressions that can exist between the brackets in an if statement. The left bracket itself begins the “test” part of the statement. In fact, each of the preceding if statements can be rewritten without brackets as in: if test expression Table 12-3: Operators for Test Expressions Operator What Is Being Tested? -b file Is the file block special (e.g., a block device)? Used to identify disk and tape devices. -c file Is the file character special (e.g., a character device)? Used to identify serial lines and terminal devices. -d file Is the file a directory? -e file Does the file exist? -f file Does the file exist, and is it a regular file (e.g., not a directory, socket, pipe, link, or device file)? -g file Does the file have the set-group-id bit set?
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply