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

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

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

Chapter 3. Command Language<br />

Quoting<br />

<strong>qsh</strong> is a program that:<br />

v reads input from either a file or a terminal,<br />

v breaks the input into tokens,<br />

v parses the input into simple and compound commands,<br />

v performs various expansions on each command,<br />

v performs redirection of input and output,<br />

v runs the commands, and<br />

v optionally waits for the commands to complete.<br />

<strong>qsh</strong> implements a command language that has flow control constructs, variables,<br />

and functions. The interpretative language is common to both interactive and<br />

non-interactive use (shell scripts). So the same commands that are entered at an<br />

interactive command line can also be put in a file and the file can be run directly by<br />

<strong>qsh</strong>.<br />

For more information about particular features of <strong>qsh</strong>, see the following topics:<br />

v Quoting (including the escape character, literal quotes, and grouping quotes)<br />

v Parameters (including positional parameters and special parameters)<br />

v Variables (including variables set and variables used by <strong>qsh</strong>)<br />

v Word expansions (including tilde expansion, parameter expansion, command<br />

substitution, arithmetic expansion, field splitting, path name expansion (i.e. wild<br />

carding), and quote removal)<br />

v Redirection (including here-documents)<br />

v Using commands (including pipelines, lists, and compound commands)<br />

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

Use quoting to remove the special meaning of certain characters to <strong>qsh</strong>. You can<br />

use:<br />

v The escape character (backslash) to remove the special meaning of the following<br />

character with the exception of . If a follows the backslash,<br />

<strong>qsh</strong> interprets it as a line continuation. For example, \$ removes the special<br />

meaning of the dollar sign.<br />

v Literal (or single) quotes (’...’) to remove the special meaning of all characters<br />

except the single quote.<br />

v Grouping (or double) quotes (“...”) to remove the special meaning of all<br />

characters except dollar sign ($), backquote (′), and backslash (\). The backslash<br />

retains its special meaning as an escape character only when it is followed by a<br />

dollar sign ($), backquote (′), double quote (“), backslash (\), or .<br />

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

© Copyright <strong>IBM</strong> Corp. 1998, 1999 11

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

Saved successfully!

Ooh no, something went wrong!