for the command to terminate, but will continue to interpret the shell file from the closing marker. This is great for feeding lengthy information into commands or programs. Again, if readers pester me, I’ll come up with some lengthy examples. Shell file example Almostany non-trivialexamplewill be hardtounderstand for abeginner. Isuggest that you start by taking any ‘long’ command line (or sequence of command lines) you happen to use, and type that in as a shell file. As an example of shell file programming, suppose that we wish to write a shell programfilewhich, with asingle command,will allowus toassemblean assembler source code file.
We wish to produce a listing file, delete its editor backup file, perform a directory listing of the file and then edit the file. An appropriate shell file would be: ;Shell file to perform assembly functions ;Usage: doasm asmfilename listfilename ; + ;Echo commands to screen trap ;Stop on error SSASM -l $1.s >$2.lst ;Perform assembly notrap ;Prevent shell exit ;if backup file is not present delete $1.bak ;Remove the backup file dir $1 ;List the new directory entry pause .100 ;Wait two seconds edit $1.s ;Edit the source code This file may be created with the 1616/OS editor by entering edit doasm.shell and typing the text.
And again, if readers pester me, I’ll come up with some longer examples. Starting Programs User Tutorial Manual Page 43