2.3.7 The sh Command

The sh command executes a command in the outside environment. It’s syntax is simply the command sh followed by any commands that you would normally execute at a shell prompt. This can be convenient if, for example, you accidentally ran Fatback before you mounted the file system where you intended to place to files you are going to undelete to. In this case, you could execute the mount command within a sh command like this:

sh mount /dev/ad0s1 /mnt/extra-hd

On a more advanced note, the sh is implemented with improved signal handling which is not present in the standard UNIX system() function. This makes it possible to run even dangerous processes without the risk of crashing the parent process (fatback in this case). In other words, fear not the sh command, for it will only bring good fortune to thee.