Please enable JavaScript to view this site.

The general syntax of an A-Shell system command line is:

<command-name> {switches} {arguments} {switches}

or, in the case of many commands that operate on files, and/or which accept wildcard filespecs:

<command-name> {<outfile>=} {wildcard list} {switches}

<Angular brackets> are used in these syntax examples to indicate a token that must be replaced, while {curly brackets} indicate items that may be replaced (i.e., are optional). So in the example above, {<outfile>=} indicates an optional term; if specified, <outfile> must be replaced with an actual argument, such as myfile.txt.

The command name (e.g. COPY) is never case sensitive, and is generally given as just the name, without the extension or the directory location. Specifying more than just the name may alter the search path (for which see next topic). If the command takes arguments, they are usually not case sensitive, but this could be up to the discretion of the command implementation.

Switches are always preceded by a forward slash, and are virtually never case sensitive. In most cases, the switch may be abbreviated to the minimum number of unique characters for that command. For example, many commands support the switch /query, which can usually be abbreviated to /q. In some cases switches may precede the arguments, but the most common position is at the end.

Most commands support the switch /? to display help for the command.

The <outfile=> syntax element in the second example above indicates that the output of the command will be sent to that file, rather than to the screen. This is roughly the AMOS equivalent of the Unix technique of redirecting stdout to a file.

For some commands, like COPY and APPEND, <outfile=> is mandatory.

Also note that unlike Windows and Unix, output (destination) arguments precede the input (source) file arguments, i.e. they are reversed and require the equal sign as in a program assignment statement. For example: COPY DEST.LST = SRC.TXT.

Command lines are tokenized using both spaces and commas, plus other punctuation characters. For example, the command name itself may be terminated by a space, slash, equal sign, or new line. Arguments for system commands are typically separated by commas, while arguments for DO commands must be separated by spaces.

The semicolon marks the beginning of a comment, as in this example:

DIR/V MYAPP.LST=A.RUN,B.RUN,C.RUN ;this is a comment

This would create the file myapp.lst containing the directory information including version (/V) of the three specified files.

Most commands, including all wildcard commands, accept both DevPPN and native filespecs, but the native filespecs must be enclosed in double quotes, for example:

COPY ASHLOG.TXT = "/vm/miame

TAIL "C:\TEMP\SYSTEM.LOG" /L:5

Note that wildcards are not allowed in conjunction with native filespecs.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software