SPAT(1) DOS COMMANDS SPAT(1) NAME SPAT : To add pattern matching to single argument commands. SYNOPSIS SPAT [] [] [] [] TEMPLATE SPAT "com/a,pat/a,opt1,opt2,opt3,opt4" PATH S: DESCRIPTION SPAT is a script file that uses the LIST command to add pattern matching expression to single argument commands. The first argument is the name of the command and the second argument is a pattern matching expression. The command will be executed for each file that matches the pattern expression. For example, if there are 3 files in the current directory, named a b and c, > SPAT MORE #? will execute the following three command: MORE a MORE b MORE c thus displaying the 3 files on the screen one after another. What SPAT does is to use the list command to resolve the pattern matching expression and produce a file that contains lines of the format opt1 opt2 opt3 opt4 where corresponds to all the files that match the pattern expression (1 line per matching name). The file stored into the t: directory (normally on the RAM: disk) is then executed by SPAT. OPTIONS COM : The name of the command to execute. PAT : The pattern matching expression. opt1..4 : these arguments are passed to the command as extra arguments white being changed. SEE ALSO DPAT, LIST. EXAMPLE SPAT protect script:#? +s ; sets the s flag for all files in script.