[Coco] using another VAR in a script.

Robert Gault robert.gault at worldnet.att.net
Fri Oct 15 18:11:09 EDT 2004


Paul T. Barton wrote:
> Boisy, et al...
> 
> I'd like to issue a command like:
> format %1 %2 "diskname" r
> where the %2 is the "-L" option.
> Will/can this work?
> 
> How do I set it up for the "-L" input?
> accept "-L" or " " ?
> 
> Paul
> 

The option should be "L" not "-L" for any version of format I'm familiar 
with.

Just for a test, enter the following command lines with a scrap disk in 
drive 0:
var.1=L
format /d0 "diskname" r %1
I don't see why this would be easier than remembering what L does and 
issuing it directly. Even if you plan a script that prompts a user for 
the L / notL option, it still seems like more work than needed.

If it is a case of not liking to use "help format" to see the options, 
just create a script that has the standard options you want to use, give 
it a good name (like dskini0), put it in the command directory, and give 
it e pe attributes. Then you can run your special format plus options 
via a new command name.

To get a space for %1 just say  var.1=" " . You can test that by: 
var.1="a b"
echo %1




More information about the Coco mailing list