Shell Context [Shell]UNIX Shell Commands[/Shell]
Executes the UNIX shell commands contained in the context and displays the results.

To embed the results of a shell command into one of your pages, put a Shell context into a template. The shell commands contained inside the context are executed, and any returned value is displayed in place of the context. Any [xxx] tags inside the context are first substituted for their real values before the shell command is executed.

Example (normally you would put the following text into a .TPL file on your server and use a web browser to link to it):

<pre>
[Shell]ls -l[/Shell]
</pre>

In this example, the shell command "ls -l" is executed, and the results (a listing of all the files in the current directory) is displayed. The <pre> tags are used to format the results in an HTML page. The user privileges are the same as the WebDNA program itself (which is typically logged on as user nobody).

Caution! Shell has complete access to your hard disk and all programs on your web server. You can write a Shell context to erase the contents of your hard disk. However, remote visitors to your web site have no way of executing their own Shell contexts remotely. They can only execute shell commands inside a template file that you have saved on your web server's hard disk.

User Contributed Notes
ShellContext  

Copyright © 2008 WebDNA Software Corporation, Inc.