2.3 < command
2.3.1 Syntax
< filename
<< filename
2.3.2 Purpose
Run a simulation in batch mode. Gets the commands and circuit from a disk
file. << clears the old circuit, first.
2.3.3 Comments
You can invoke the batch mode directly from the command that starts the
program. The first command line argument is considered to be an argument
for this command.
The file format is almost as you would type it on the keyboard. Commands
must be prefixed with a dot, and circuit elements can be entered directly,
as if in build mode. This is compatible with Spice.
The log command makes a file as you work the program, but the
format is not correct for this command. To fix it, prefix commands
with a dot, and remove the build commands.
Any line that starts with * a comment line.
Any line that starts with . (dot) is a command.
Any line that starts with a letter is a component to be added or changed.
A < command in the file transfers control to a new file. Files can be
nested.
A bare < in the file (or the end of the file) gives it back to the
console.
Unlike SPICE, commands are executed in order. This can result in some
surprises when using some SPICE files. SPICE queues up commands, then
executes them in a predetermined order.
2.3.4 Examples
- < thisone.ckt
- Activates batch mode, from the file thisone.ckt, in the current directory.
- < runit.bat
- Use the file runit.bat.
From the shell: on start up:
- gnucap afile
- Start up the program. Start using the file afile.ckt in batch mode, as if you entered < afile as the first
command.
- gnucap <afile
- Start up the program. Start using the file afile.ckt with commands as if you typed them from the keyboard.