Graphics.DOUGStateFileBatchEditor - lordmundi/wikidoctest GitHub Wiki

DOUG State File Batch Editor

This script takes in command line options to edit fields of a node in a state file. It can be passed in filenames of as many state files as you want and wildcards are supported. For example, to change the xyz to "0.0 0.0 0.0" for the node "SOME_GF" in all of the state files under all subdirectories:

state_file_edit.pl --node="SOME_GF" --xyz="0.0 0.0 0.0" */*

Run "perldoc state_file_edit.pl" to see options and advanced usage info.

Also, an upgrade to this script is requested!!! It would be nice if there was a "-p/--preserve" option to the script which would read in the current file date immeditely before it overwrites it, and then use the touch command to put the date back so that file modification dates can be preserved. Thanks to anyone who has a few minutes to update it and test it out. —frankie

OK, I added in this capability. By default, the script does not update timestamps at all (it reverts them to the original time, but a command-line option can be used to cause timestamps to get updated). —frankie

state_file_edit.pl (11/04/06)