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.

Exit status<br />

Related information<br />

v >0 when successful.<br />

v “true - Return true value”<br />

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

getopts - Parse utility options<br />

Synopsis<br />

Description<br />

Options<br />

Operands<br />

Exit status<br />

getoptsoptstring varname<br />

You can use getopts to check the positional parameters for legal options. An option<br />

argument begins with a minus (-). The end of the the options is marked by the first<br />

argument that does not begin with a minus or an argument of —.<br />

Each time you call getopts, it places the next option letter it finds in varname. <strong>qsh</strong><br />

stores the index of the next parameter to be processed in the variable OPTIND.<br />

When an option requires an argument, <strong>qsh</strong> stores the argument in the variable<br />

OPTARG.<br />

None.<br />

The option letters recognized by getopts are identified in optstring. If a letter is<br />

followed by a colon (:), that option is expected to have an argument. The argument<br />

can be separated from the option letter by s.<br />

With each call to getopts, varname is updated with the option letter.<br />

v 0 when successful.<br />

v >0 when unsuccessful.<br />

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

let - Evaluate arithmetic expression<br />

Synopsis<br />

let arg ...<br />

Chapter 4. Utilities 101

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

Saved successfully!

Ooh no, something went wrong!