The source command is used to load circuit files and command scripts.
source fileThis command will read and processes circuit descriptions and command text from the file. This is done implicitly if the name of the file is simply given as a command. The source operation will be performed, provided that the file name does not clash with a WRspice command. If the file does not have a path prefix, it is searched for in the search path specified by the sourcepath variable. If not in the search path, a full path name should be given. Shell variables found in the circuit deck (but not in the commands text) are evaluated during the source. The reset command can be used to update these variables if they are later changed by the shell after sourcing.
The source command is Internet aware, i.e., if a given filename has an ``http://'' or ``ftp://'' prefix, the file will be downloaded from the internet and sourced. The file is transferred as a temporary file, so if a permanent local copy is desired, the edit or listing commands should be used to save the circuit description to disk.
Command lines must be surrounded by the lines .exec or .control and .endc in the file, or prefixed by ``*@'' or ``*#'' in order to be recognized as commands. Commands found in .exec blocks or *@ lines are executed before the circuit is parsed, thus can set variables used in the circuit. Commands found in .control blocks or *# lines are executed after the circuit is parsed, so a control line of ``ac ...'' will work the same as the corresponding .ac line, for example. Use of the ``comment'' control prefixes *@ and *# makes it possible to embed commands in WRspice input files that will be ignored by earlier versions of SPICE.
The first line in any input file is considered a title line and is not parsed but kept as the name of the circuit. The exceptions to this rule are old format margin analysis input files and Xic files.