Command input files
- Last UpdatedJan 13, 2023
- 1 minute read
- PI System
- PI Server
The piconfig commands and data can be placed in any number of files and executed using theinput command.
If the input file contains many lines, all of which have the same command, a command input file may be useful:
@command @command_file
In a command file, the command specified is prepended to every line in the command file. This is useful, for example, when a file with input structure lines have been generated from another program, such as PIDIFF, or when the same complex structure is used for both input and output. For example, if the file cmds.txt contains the following lines:
tag,pointtype,pointsource
ptowner,ptgroup,ptaccess
ptsecurity
dataowner,datagroup,dataaccess
datasecurity
You can execute these commands by entering the following at the piconfig prompt:
@istructure @cmds.txt
The commands in the file are executed as follows:
@istructure tag,pointtype,pointsource
@istructure ptowner,ptgroup,ptaccess
@istructure ptsecurity
@istructure dataowner,datagroup,dataaccess
@istructure datasecurity
This technique works for both piconfig scripts and for interactive sessions.