The dir command displays the directory on standard output (normally the video display). When 1616/OS receives this particular command it creates a disk file called myfile and directs all the output from the dir command into the file. If the file already exists, this will overwrite (and thus destroy) the old contents of the file. dir >>myfile This command differs from the previously described one in that the resultant directory is appended to the end of the file myfile , rather than being put into a fresh file. cat con: > filename Any text you like Ctrl D This copies whatever is typed on the keyboard into a file, stopping only when you type the End Of File (EOF) character.
The EOF character will not normally be set, but can be changed to , by using option 6 4 . Ctrl D edit myfile Thiscommand usesthe full-screeneditor upon thefile myfile . The file edcommandfile would contain a sequence of char- acters which are presented to the editor as if you had typed them in. SSASM asmfile.s -l >CENT: }errorlog SSASMistheM68000assemblerforthe1616. Inthisexample, it assembles the file of assembler code asmfile.s . The assembly output is sent to the parallel (centronics) printer port. Any error messages are recorded in the file errorlog in the current directory. Another redirection facility available is piping. This is used to link many com- mands together.
The result of the first command becomes the input of the next command, and so on. It is these redirection facilities that enable you to ‘build’ very powerful and complex commands out of a series of simple commands. For example, you might use some U NIX style disk utilities to generate a phone list for a visit to Victoria from a more extensive address list, with a line similar to: cat address.list | grep Vic | cut -f1-2,7 > phone.list which would throw away any line not containing Vic, then take the first, second and seventh space delimited fields of what remains, and put the result in another file.
Wildcard expansion Often you will wish to use an inbuilt or a transient command to perform some operation upon a group of files. There will frequently be some similarity between the names of the files. To specify such a group of filenames you may enter a Command Handling User Tutorial Manual Page 27