WebRSH: Help: Command Line Syntax:
Commands can be entered in the command field of WebRSH's main form. They can also be entered through appropriate links.

WARNING: WebRSH is CASE SENSITIVE!

WebRSH supports 19 specialized commands, all of which are lower-cased and start with 'rsh'. Any other command will be forwarded to the DOS/console shell for execution. There are two basic methods for execution of such shell commands: The first is to spawn the command as an independent process, without waiting for it to finish, and without returning any output to the client. This method is appropriate for launching applications that are intended to be running for some time. The second method is to wait for the command to finish, and to return its output (if any) to the client. WebRSH utilizes the fact that the DOS/Win32 shell itself is case-insensitive, and chooses the execution method according to the CASE OF THE FIRST CHARACTER. Commands which start with a capital character (such as 'Dir') will use the first method, and would thus not result in any output. Commands which start with a lower-case character (such as 'dir') will use the second method, and would thus return their output to the client. (Of course, using 'Dir' will usually not serve any useful purpose, so one is more likely to use 'dir' for this particular command.)

WARNING: When using the second method, one should know in advance that the command will complete its task without prompting for further input. Otherwise, the execution attempt would result in a hang process. Under Windows NT, such hang processes can usually be safely killed using WebRSH's killable links (or the "rshkill" command). Moreover, many system commands would recognize that they are called in a noninteractive mode, and would die by themselves if they need to prompt the user. Under Windows 95, however, the situation is much more problematic: such hang processes may be impossible to terminate without shutting the system down. Moreover, such processes may have various bad effects on the system. They may reduce system stability and consume a significant amount of system resources. An attempt to kill such processes might only make things worse, and it might even crash the system. Further, a hang process might prevent Windows 95 from shutting down, such that it may become necessary to use the power switch (or a reset button) in order to reboot it. These problems lead to the following recommendations WHEN USING THE COMMAND LINE INTERFACE UNDER WINDOWS 95:
1) Avoid using the command line interface as much as possible.
2) If you must use it, do so with extreme caution. Only use familiar commands that have been previously tested to work well with WebRSH.
3) If you have created a hang process: Do not attempt to kill it. Reboot the system as soon as possible, but only do so when you are physically located near the system (so that you can use the power switch if needed).

WebRSH supports the following specialized commands: rshhome, rshfm, rshedit, rshps, rshkill, rshkilllist, rshlaunchlist, rshexeclist, rshgetlist, rshget, rshgettxt, rshgetbin, rshtextmode, rshuploadform, rshupload, rshstart, rshperl, rshgethtm, and rshoptions. They are mainly intended to be used from WebRSH's generated hyperlinks. Nevertheless, they may also be used from the command line. The syntax for these commands is described below. Moreover, the standard DOS command 'cd' is recognized and receives "special treatment" by WebRSH, so that it should be safe to use even in case the requested directory is not accessible. It can be used to safely change WebRSH's working directory for the next command.

NOTE: The working directory is a property of the form (or link) that sends the command. The program changes to this directory upon startup.

Most commands are responded with an HTML page containing their output. This output may contain text output, as well as hyperlinks and forms which provide an easy to use interface for execution of further commands.

SPECIALIZED COMMAND SYNTAX:

rshhome
Changes the working directory to the default home directory.

rshfm [DIR]
Invokes WebRSH's file manager in the directory DIR, or in the current working directory if DIR is not specified.

rshedit [FILE]
Opens FILE in WebRSH's text editor, or starts the text editor with a blank file if FILE is not specified.

rshps
Returns a list of currently running processes. The precise output depends on the PS Library in use.

rshkill PID
Terminates (kills) the process whose pid is PID. The precise utility used to perform the killing depends on the PS Library in use.

rshkilllist
Returns a list of "killable links" for currently running processes. The precise output depends on the PS Library in use.

rshlaunchlist [DIR]
Returns a list of "launchable links" for all files in the directory DIR, or in the current working directory if DIR is not specified. A "launchable link" to the file FILENAME executes the command 'rshstart FILENAME'.

rshexeclist [DIR]
Returns a list of "executable links" to .exe and .bat (also .cmd on NT) files in the directory DIR, or in the current working directory if DIR is not specified. An "executable link" to the file FILENAME executes it, waits for it to finish, and returns the resulting output.

rshgetlist [DIR]
Returns a list of "downloadable links" for all files in the directory DIR, or in the current working directory if DIR is not specified. A "downloadable link" to the file FILENAME sends the file to the client.

rshget FILENAME
Sends FILENAME to the client, reporting its MIME type according to its extension, and to WebRSH's MIME table. The file is sent in its precise binary form.

rshgettxt FILENAME
Implements the "GET as TEXT" option from the command line. Sends FILENAME to the client, reporting its MIME type as text/plain. The file is sent either in its precise binary format or converted to a "UNIX-format" text file, depending on the appropriate setting in the "General Preferences" options menu.

rshgetbin FILENAME
Implements the "GET as BIN" option from the command line. Sends FILENAME to the client, reporting its MIME type as application/octet-stream. The file is sent in its precise binary form.

rshtextmode COMMAND
Executes COMMAND and returns only its output to the client (as text/plain). Can be used to store the output of COMMAND to a file.

rshuploadform [DIR]
Returns an upload form for the directory DIR, or for the current working directory if DIR is not specified.

rshupload
Used only by upload forms as part of uploading a file. This command should not be used from the command line.

rshstart [/min | /max] FILENAME
Launches FILENAME which can be an executable, a file that has a registered association with an executable, or a link to any such file. This command implements the DOS 'start' command and acts similarly to double clicking FILENAME's icon in explorer. /min starts the program minimized, /max starts it maximized (the default is a regular window).

rshperl PERLSUB
Executes PERLSUB (where PERLSUB is a string of text) as a Perl subroutine (through an eval(PERLSUB) command), and returns its output.

rshgethtm HTMFILE
Retrieves HTMFILE (which must reside in WebRSH's htm directory), dynamically parses it to replace certain tags with current settings, appends WebRSH's main form, and sends it to the client.

rshoptions
Invokes WebRSH option settings.