Qshell Interpreter (qsh) - FTP Directory Listing - IBM
Qshell Interpreter (qsh) - FTP Directory Listing - IBM
Qshell Interpreter (qsh) - FTP Directory Listing - IBM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
$(command)<br />
or by using backquotes:<br />
′command′<br />
Arithmetic expansion<br />
Field splitting<br />
The backquoted version is provided for compatibility and its use is discouraged.<br />
The shell expands the command substitution by running command in a subshell<br />
environment and replacing the command substitution with the standard output of the<br />
command, removing sequences of one or more s at the end of the<br />
substitution. Embedded s before the end of the output are not removed;<br />
however, during field splitting, they may be translated into s, depending on<br />
the value of the IFS variable and quoting that is in effect.<br />
Arithmetic expansion provides a mechanism for evaluating an arithmetic expression<br />
and substituting its value. The format for arithmetic expansion is:<br />
$((expression))<br />
Path name expansion<br />
Quote removal<br />
18 <strong>Qshell</strong> <strong>Interpreter</strong> (<strong>qsh</strong>)<br />
The expression is treated as if it were in double-quotes, except that a double-quote<br />
inside expression is not treated specially. The shell expands all tokens in expression<br />
for parameter expansion, command substitution, and quote removal. <strong>qsh</strong> treats the<br />
result as an arithmetic expression (page 19) and substitutes the value of the<br />
expression.<br />
After parameter expansion, command substitution, and arithmetic expansion <strong>qsh</strong><br />
scans the results of expansions and substitutions that did not occur in<br />
double-quotes for field splitting and multiple fields can result.<br />
<strong>qsh</strong> treats each character of the IFS variable as a delimiter and uses the delimiters<br />
to split the results of parameter expansion and command substitution into fields. If<br />
the value of the IFS variable is null, no field splitting is performed.<br />
When the noglob option is not set, file name generation is performed after field<br />
splitting is complete. Each word is viewed as a series of patterns (page 18),<br />
separated by slashes. The process of expansion replaces the word with the names<br />
of all existing files whose names can be formed by replacing each pattern with a<br />
string that matches the specified pattern. There are two restrictions:<br />
1. a pattern cannot match a string containing a slash, and<br />
2. a pattern cannot match a string starting with a period unless the first character<br />
of the pattern is a period.<br />
The quote characters, backslash (\), single quote (′), and double quote (“), are<br />
removed unless the character has been quoted.