Davex/doc/help/Equal

51 lines
1.8 KiB
Plaintext

= -- print a complete pathname or a string built from a template
syntax: = <pathname> [<template>]
ex: = %
= xyz
como my.list;= =:bas
= .61prodos
Prints a complete pathname. Wildcards are allowed. The
first example prints the pathname of the Davex directory.
The second builds a complete pathname by appending the given
partial path to the current prefix. The third prints, into
a file called "my.list", complete pathnames for all BAS
files in the current directory. The fourth prints the
pathname of a file PRODOS in slot 6, drive 1.
When '=' is used without wildcards, as in the fourth
example, files with the printed pathnames do not necessarily
exist.
The Power of Templates
When the second parameter is given, wildcard expansion still takes
place on the first parameter, but the _second_ parameter is printed,
once all wildcard characters have been replaced.
Suppose you want to use the "blist" external command to list a group
of BAS files into TXT files with corresponding names in another
directory.
como cmd.file;= ?:bas "como /disk/listings/=;blist ="
If this looks complicated, don't worry--it is. First, ">" is used to
redirect output to the file "cmd.file"--we are building a list of
commands to be executed with "exec cmd.file" later. The rest of the line
is a single use of the "=" command. The first parameter is "?:bas"--so
you are prompted yes or no for each bas file. For the ones you respond
Yes to, a string is printed to cmd.file. The string is bulit from the
third parameter to "=", which is "como /disk/listings/=;blist =".
Suppose you responded Yes to three files: grapes, apples, and banjos.
Then cmd.file would contain the following:
como /disk/listings/grapes;blist grapes
como /disk/listings/apples;blist apples
como /disk/listings/banjos;blist banjos