pw cmdfile
The pw cmdfile
command can be used on the Integration Service and the BMC TrueSight Infrastructure Management Server.
pw cmdfile
filename can be used to run a batch of pw
commands.
To speed up the execution of large numbers of commands, run the command with pw cmdfile
filename. The script must contain the pw
commands exactly as you would type them directly at the shell prompt.
Speed will be improved by running the following pw
commands with the pw cmdfile
versus comparing the command in the shell script.
pw device
pw template
pw threshold
pw baseline
pw event
pw group
Example:
pw device add
device1 -t
template
pw device add
device2 -t
template
pw device add
device3 -t
template
pw device add
device4 -t
template
pw device add
device5 -t
template
Then, run the cmdfile command by using pw cmdfile
filename.
The commands will be executed in order, one by one.
At the end, this command also prints the total time taken to run all commands.
Note
Add regular shell commands in the command file and they will run normally. However, special shell commands and control flow operators are not supported.
Comments can be added by prefixing the line with the symbol '#'.
Comments
Log in or register to comment.