Columbia MM
MM Manual

GIVING COMMANDS TO THE SHELL

You may want to use UNIX shell commands (that is, commands you usually give at the UNIX shell prompt) in connection with work in MM. A shell command may be a built-in command or it may be the command to execute a program. One way is to suspend MM, do the commands at the shell prompt, and then continue the MM process; there are other ways. The simplest is to use an exclamation point.


USING ! WITH A UNIX SHELL COMMAND

The easiest way to run one shell command from MM is to type an exclamation point followed by the command. For example, suppose you want to check a BITNET address by giving a grep command on the file of BITNET nodes:



MM>!grep -i Fordham /usr/local/doc/bitnet/nodes.info1
FORDMRH1  Fordham University - VAX 11/785 Rhoda     VMS 5.2
FORDMULC  Fordham University Computer and Informat  VMS
FORDMURH  Fordham University Computer and Informat  VMS
MM>


One command you don't need to give with ! is ls. Instead, type a question mark at the file prompt. For example, if you want to include a file in a message and realize you forgot its name, give the control-b command to insert it and then type ? at the prompt. You'll see a list of files. You could also type a directory name followed by /? to see the files in that directory.



[control-b]
Insert file: ? Confirm to cancel
  or filename, one of the following:
 albert                   clover
 mbox                     mbox~
 springmotor              umbrella
Insert file:



SUSPENDING

You can suspend MM at any point with the command z (suspend) or with control-z. If you want to give a series of commands to the shell, suspending MM and running them from the shell prompt is faster than giving a series of commands to MM with exclamation points. For an example, here is just that same grep command again.



MM>z
[1] + Stopped (signal)         /usr/local/bin/mm
$ grep -i Fordham /usr/local/doc/bitnet/nodes.info1
FORDMRH1  Fordham University - VAX 11/785 Rhoda     VMS 5.2
FORDMULC  Fordham University Computer and Informat  VMS
FORDMURH  Fordham University Computer and Informat  VMS
$ mm
/usr/local/bin/mm
MM>


While the suspend command can be used from any MM prompt, control-z can be used from almost any point at all, like the middle of a command line or the middle of writing a message. When you return from control-z, you do not see a prompt, but MM is at exactly the point where you left it. Use control-r to redisplay the current line so you can see where you are.



The right BITNET address to use is [control-z]
[1] + Stopped (signal)         /usr/local/bin/mm
$ grep -i Fordham /usr/local/doc/bitnet/nodes.info1
FORDMRH1  Fordham University - VAX 11/785 Rhoda     VMS 5.2
FORDMULC  Fordham University Computer and Informat  VMS
FORDMURH  Fordham University Computer and Informat  VMS
$ mm
/usr/local/bin/mm
[control-r]
The right BITNET address to use is



PUSHING TO A SUBSHELL

An alternative to suspending is to start a subshell from MM. A shell is considered a subshell when it is started under another process.