Revision [1899]

Last edited on 2013-05-05 16:02:53 by DavidLee
Additions:
See [[CommandTest test]] for information on the test ("[") command
[[CommandTest]]
Deletions:
[[CommandsTest]]


Revision [1898]

Edited on 2013-05-05 16:01:46 by DavidLee
Additions:
[[CommandsTest]]


Revision [1601]

Edited on 2010-12-01 06:58:34 by RaymondYee [got rid of extra the from "the the"]
Additions:
Conditions can be tested with either the boolean operations ""||"" and "&&" or with the if/elif/else/then clauses.
Deletions:
Conditions can be tested with either the boolean operations ""||"" and "&&" or with the the if/elif/else/then clauses.


Revision [1599]

Edited on 2010-11-30 12:26:04 by DavidLee [got rid of extra the from "the the"]
Additions:
Conditions can be tested with either the boolean operations ""||"" and "&&" or with the the if/elif/else/then clauses.
Deletions:
Conditions can be tested with either the boolean operations "||" and "&&" or with the the if/elif/else/then clauses.


Revision [588]

Edited on 2009-05-30 06:23:38 by DavidLee [got rid of extra the from "the the"]
Additions:
[[CategoryHowTo]]


Revision [547]

Edited on 2009-05-21 19:12:52 by DavidLee [got rid of extra the from "the the"]
Additions:
[[HowTo]]
Deletions:
[HowTo]


Revision [546]

Edited on 2009-05-21 19:12:39 by DavidLee [got rid of extra the from "the the"]
Additions:
XML Expressions can also be used as conditons [[HowToXMLCondition]]


Revision [544]

Edited on 2009-05-21 19:10:08 by DavidLee [got rid of extra the from "the the"]
Additions:
----
[HowTo]


Revision [543]

Edited on 2009-05-21 19:09:51 by DavidLee [got rid of extra the from "the the"]

No Differences

Revision [542]

Edited on 2009-05-21 19:05:17 by DavidLee [got rid of extra the from "the the"]
Additions:
command && echo is success
[ -e myfile.txt ] && { read VAR < myfile.txt ; echo $VAR ; }
Deletions:
$ command && echo is success
$ [ -e myfile.txt ] && { read VAR < myfile.txt ; echo $VAR ; }


Revision [541]

Edited on 2009-05-21 19:04:57 by DavidLee [got rid of extra the from "the the"]
Additions:
The "elif" and "else" parts are optional.
For example, if the file "myfile.xml" exists then read it into a variable otherwise print an error message
if [ -f myfile.xml ] ; then
xread var < myfile.xml
else
echo File myfile.xml does not exist
Deletions:
The "elif" and "else" parts are optional.


Revision [540]

Edited on 2009-05-21 19:00:08 by DavidLee [got rid of extra the from "the the"]
Additions:
The conditional test the return status of commands. If the command returns 0 then that is considered "true", otherwise the condition is "false". A common command used for conditionals is the "test" command, usually using the "[ test ]" syntax.
The "elif" and "else" parts are optional.


Revision [539]

Edited on 2009-05-21 18:58:21 by DavidLee [got rid of extra the from "the the"]
Additions:
====Structured Conditionals (if / elif / else / fi )====
If the condition or conditional operations are more complicated then the structured conditionals are more useful.
This is the if / elif / else / fi construct.
The general form is
if condition1 ; then
condition1 commands
elif condition2 ; then
condition2 commands
else
otherwise commands
fi


Revision [538]

The oldest known version of this page was created on 2009-05-21 18:53:46 by DavidLee [got rid of extra the from "the the"]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki