02.03.2014 Views

Tornado

Tornado

Tornado

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.

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

Table 5-14<br />

Shell Special Characters (Continued)<br />

stty Setting Common Value Description<br />

start CTRL+Q Resume output.<br />

susp CTRL+Z Suspend the <strong>Tornado</strong> shell.<br />

N/A ESC Toggle between input mode and edit mode.<br />

This character is fixed; you cannot change it with stty.<br />

-> copy < input > output<br />

If the file to which standard output is redirected does not exist, it is created.<br />

Ambiguity Between Redirection and C Operators<br />

There is an ambiguity between redirection specifications and the relational<br />

operators less than and greater than. The shell always assumes that an ambiguous<br />

use of < or > specifies a redirection rather than a relational operation. Thus the<br />

ambiguous input line:<br />

-> x > y<br />

writes the value of the variable x to the stream named y, rather than comparing the<br />

value of variable x to the value of variable y. However, you can use a semicolon to<br />

remove the ambiguity explicitly, because the shell requires that the redirection<br />

specification be the last element on a line. Thus the following input lines are<br />

unambiguous:<br />

-> x; > y<br />

-> x > y;<br />

The first line prints the value of the variable x to the output stream y. The second<br />

line prints on standard output the value of the expression “x greater than y.”<br />

The Nature of Redirection<br />

The redirection mechanism of the <strong>Tornado</strong> shell is fundamentally different from<br />

that of the Windows command shell, although the syntax and terminology are<br />

similar. In the <strong>Tornado</strong> shell, redirecting input or output affects only a command<br />

executed from the shell. In particular, this redirection is not inherited by any tasks<br />

started while output is redirected.<br />

188

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

Saved successfully!

Ooh no, something went wrong!