29.06.2013 Views

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

Qshell Interpreter (qsh) - FTP Directory Listing - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Description<br />

Operands<br />

Exit Status<br />

Examples<br />

You can use let to evaluate each arg as an arithmetic expression (page 19). You<br />

may need to quote each arg since many arithmetic operators have a special<br />

meaning to <strong>qsh</strong>.<br />

Each arg is evaluated as an arithmetic expression (page 19).<br />

v 0 when the value of the last expression is non-zero<br />

v 1 when the value of the last expression is zero<br />

1. Add one to the variable x.<br />

let x=x+1<br />

[ Legal | AS/400 Glossary ]<br />

test - Evaluate expression<br />

Synopsis<br />

Description<br />

102 <strong>Qshell</strong> <strong>Interpreter</strong> (<strong>qsh</strong>)<br />

test expression<br />

[ expression ]<br />

You can use test to check the type of a file, check permissions on files, compare<br />

two strings, or compare two arithmetic expressions.<br />

You can construct expressions using the following primaries:<br />

v -b file True if file exists and is a block special file.<br />

v -c file True if file exists and is a character special file.<br />

v -d file True if file exists and is a directory.<br />

v -e file True if file exists regardless of type.<br />

v -f file True if file exists and is a regular file.<br />

v -g file True if file exists and its set group id flag is set.<br />

v -h file True if file exists and is a symbolic link.<br />

v -k file True if file exists and its sticky bit is set.<br />

v -L file True if file exists and is a symbolic link.<br />

v -n string True if the length of string is non-zero.<br />

v -N file True if file exists and is a native object.<br />

v -p file True if file exists and is a pipe.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!