<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AIX Commands, Tools, Scripts and Explanations &#187; if</title>
	<atom:link href="http://icancompute.ca/aix/tag/if/feed/" rel="self" type="application/rss+xml" />
	<link>http://icancompute.ca/aix</link>
	<description>Everything I have learnt and used while being an AIX systems adminstrator.  Custom scripts, commands and projects used to maintain a virtualized AIX server environment</description>
	<lastBuildDate>Tue, 05 Jun 2012 19:25:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Korn Shell (KSH) Command &#124; if Test Parameters</title>
		<link>http://icancompute.ca/aix/commands/korn-shell-ksh-command-test-parameters/</link>
		<comments>http://icancompute.ca/aix/commands/korn-shell-ksh-command-test-parameters/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 15:13:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[korn shell]]></category>
		<category><![CDATA[ksh]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://icancompute.ca/aix/?p=257</guid>
		<description><![CDATA[if/Test Statement test -e file [ -e file ] [[ -e file ]] x=2 test $x -eq 1 [ $x -eq 2 ] [[ $x -eq 3 ]] File Test Operators File status can be examined using several operators. Parameter:     Meaning -s file     size greater than zero -r file      exists and [...]]]></description>
				<content:encoded><![CDATA[<h3>if/Test Statement</h3>
<p>test -e file<br />
[ -e file ]<br />
[[ -e file ]]</p>
<p>x=2<br />
test $x -eq 1<br />
[ $x -eq 2 ]<br />
[[ $x -eq 3 ]]</p>
<h3>File Test Operators</h3>
<p>File status can be examined using several operators.</p>
<p><strong>Parameter</strong>:     Meaning<br />
<strong>-s file</strong>     size greater than zero<br />
<strong>-r file</strong>      exists and is readable<br />
<strong>-w file     </strong> exists and is writable<br />
<strong>-x file</strong>      exists and is executable<br />
<strong>-u file     </strong> exists and has the SUID bit set<br />
<strong>-g file</strong>       exists and has the SGID bit set<br />
<strong>-k file</strong>      exists and has the SVTX sticky bit set<br />
<strong>-e file     </strong>  exists<br />
<strong>-f file</strong>      exists and is an ordinary file<br />
<strong>-d file     </strong> exists and is a directory<br />
<strong>-c file     </strong> exists as a character special file<br />
<strong>-b file     </strong> exists and is a named pipe file<br />
<strong>-p file</strong>      exists and is a named pipe file<br />
<strong>-L file     </strong> exists and is a symbolic link</p>
<p><strong>-O file</strong> <strong>     </strong> file exists and its owner is the effective user id<br />
<strong>-G file<strong>     </strong> </strong> file exists and its group is the effective group id<br />
<strong>-S file<strong>     </strong>  </strong>file exists as a socket special file</p>
<p><strong>file1 -ef file2</strong> <strong>     </strong> file1 is another name for file2<br />
<strong>file1 -nt file2<strong>     </strong> </strong> file1 is newer than file2<br />
<strong>file1 -ot file2<strong>     </strong> </strong> file1 is older than file2<br />
<strong>-t des</strong> <strong>     </strong> file descriptor des is open and associated with a terminal device</p>
<h3>Numeric Expressions</h3>
<p>For use with arithmetic</p>
<p><strong>Expression        </strong>Result<br />
<strong>exp1 -eq exp2</strong>      exp1 is equal to exp2<br />
<strong>exp1 -ne exp2</strong>      exp1 is not equal to exp2<br />
<strong>expl -lt exp2</strong>      exp1 is less than exp2<br />
<strong>exp1 -le exp2</strong>      exp1 is less than or equal to exp2<br />
<strong>exp1 -gt exp2</strong>      exp1 is greater than exp2<br />
<strong>exp1 -ge exp2</strong>     exp1 is greater than or equal to exp2</p>
<h3>String Expressions</h3>
<p>While examining strings use the following<br />
<strong>Parameter</strong>        Meaning<br />
<strong>-n str</strong>      string is non-zero in length<br />
<strong>-z str</strong>     string is zero in length<br />
<strong>str1 = str2</strong>     str1 is the same as str2<br />
<strong>str1 != str2    </strong> str1 is not the same as str2</p>
<p><strong>[[ str = pattern ]]</strong>     str matches pattern<br />
<strong>[[ str != pattern ]]</strong>      str does not match pattern<br />
<strong>[[ str1 &lt; str2 ]]  </strong>   str1 is before str2 in the ASCII collation seq.<br />
<strong>[[ str1 &gt; str2 ]]</strong>     str1 is after str2 in the ASCII collation seq.<br />
<strong>[[ -o opt ]]</strong>     option opt is on for this shell</p>
]]></content:encoded>
			<wfw:commentRss>http://icancompute.ca/aix/commands/korn-shell-ksh-command-test-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
