Computers: Universe: Verbs

Verbsare all command words. Enter a verb at the UniVerse prompt, and something will happen: even if it is only the display of a message telling you that the verb requires more parameters than you have supplied.

Several of the commands you have used in previous sections are verbs. They include:

SH: The UNIX shell command.

HELP The on-line manual command.

ED: The editor command itself.

Let's examine the SH command in more depth:

ED VOC SH
4 lines long.

----: P
0001: V
0002: /bin/sh
0003: U
0004: TICRG
Bottom at line 4.
----:

The V on the first line indicates that this is a verb. Like any VOC item, a verb can store a description after the word V.

Verbs work by running programs, and the name of the program they run appears on the second line. Here, it is the UNIX shell program /bin/sh.

The third line of the verb indicates what kind of program is being run. It can take any of the following values:

Letter

Program Language

B

UniVerse Basic

C

C shell script

D

DOS batch file

E

'External'

I

'Internal'

P

'Primitive'

Q

Query command

S

Bourne shell script

U

Operating System command

I provide the complete list for reference, but in most cases you will only need two understand two of these. B links a verb to a UniVerse Basic program. When you cover UniVerse Basic programming a little later, it is worth bearing in mind that you can create a new UniVerse verb by linking a V type VOC record to a UniVerse Basic program. U links a verb to an Operating System command. In the main, you can use verbs with a U on their third line to provide UniVerse versions of your favourite UNIX commands: but test these carefully. While most such links are well-behaved, some UNIX processes resent being invoked from inside UniVerse, and thus behave a little oddly.

Finally, the fourth line contains a series of one-letter codes which determine the kind of environment or setup required by the verb. These are all rather technical, and beyond the scope of this document. They are not always necessary, and for now you may simply leave this line clear and consult the UniVerse documentation only if your new verb behaves oddly.