16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Usage Note<br />

Localization<br />

Exit Values<br />

Portability<br />

produces:<br />

63<br />

3. The example<br />

((a=3*4))<br />

echo $a<br />

produces:<br />

12<br />

Related Information<br />

expr, sh, test<br />

let is a built-in shell command.<br />

let uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_MESSAGES<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 The last argument evaluated to a nonzero value<br />

1 The last argument evaluated to a zero value, or the expression contained a<br />

syntax error or tried to divide by zero<br />

P<strong>OS</strong>IX.2. let and ((expression)) are extensions to the P<strong>OS</strong>IX.2 standard. The<br />

P<strong>OS</strong>IX.2 portable facility for arithmetic expression evaluation is $((expression)). See<br />

“Arithmetic Substitution” on page 562 for more information.<br />

The (( )) syntax only works if the set –o korn option is in effect.<br />

lex — Generate a program for lexical tasks<br />

Format<br />

Description<br />

lex [–achlntTv] [–o file.c] [–P proto] [–p prefix] [file.l ...]<br />

lex reads a description of a lexical syntax, in the form of regular expressions and<br />

actions, from file.l. If you do not provide file.l, or if the file is named –, lex reads the<br />

description from standard input (stdin). It produces a set of tables that, together<br />

with additional prototype code from /etc/yylex.c, constitute a lexical analyzer to<br />

scan those expressions. The resulting recognizer is suitable for use with yacc. You<br />

can find detailed information regarding the use of lex in z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong><br />

<strong>Services</strong> Programming Tools.<br />

let<br />

Chapter 2. Shell command descriptions 343

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

Saved successfully!

Ooh no, something went wrong!