Pivotal GemFire® v8.1

Creating and Running gfsh Command Scripts

Creating and Running gfsh Command Scripts

gfsh offers several ways to run commands in a scripting environment.

Running gfsh Scripts

You can create and run scripts that contain gfsh commands that you wish to execute. To execute the script, use the gfsh run command. For example:
gfsh run --file=mycommands.gfsh
Note: When you run a gfsh script, interactive parameters are ignored. You can also set the script to run in quiet mode to prevent output and instruct the script to skip any errors it encounters.

Your command history file can be helpful when you write a gfsh script. A history of commands that have been executed successfully is logged in the .gfsh.history file in the home directory of the user running gfsh. You can also export a history file with the history --file=your_file_name command.