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.

expr - Evaluate arguments as an expression<br />

Synopsis<br />

Description<br />

Operands<br />

Exit Status<br />

Examples<br />

expr expression<br />

The expr utility will evaluate an expression and write the result to standard output.<br />

The formation of the expression to be evaluated is shown as follows. (expr, expr1,<br />

and expr2 can be decimal integer valued arguments or strings.)<br />

Note: The first six expressions return the result of a decimal integer comparison if<br />

both arguments are integers. Otherwise, they return the result of a string<br />

comparison. The result of each comparison will be 1 if the specified relationship is<br />

true, or 0 if the relationship is false.<br />

Expression Description<br />

expr1 = expr2 Equal.<br />

expr1 > expr2 Greater than.<br />

expr1 >= expr2 Greater than or equal.<br />

expr1 < expr2 Less than.<br />

expr1 2 an error occurred<br />

1. Evaluate an arithmetic expression.<br />

expr 10+10*10/10-10<br />

2. Evaluate a true or false condition.<br />

Chapter 4. Utilities 107

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

Saved successfully!

Ooh no, something went wrong!