opchange
command
Search and replace text in parameter values.
See also: opfind
Usages
-
opchange [-t type_pattern] [-T network_type] [-n name_pattern] [-N fullpath_pattern] [-p path] [-s] [-i] from_string to_string
Searches all parameters of operators matching the given criteria for from_string. If found, it is replaced with the to_string.
Options
|
|
Changes operators whose type matches type_pattern. |
|
|
Changes operators of network_type (see optype for information on network types). |
|
|
Changes operators with names matching name_pattern. |
|
|
Changes operators with full paths matching fullpath_pattern. |
|
|
Start searching from this path in the operator hierarchy. If you don’t specify a path, the search begins at the root (/). |
|
|
(Silent) Do not print the list of changes. |
|
|
Normally, from_string only matches whole words (for example, string “myobj” would not match value “myobj1”. You can use the -i flag to make the string match word substrings. |
Examples
opchange plastic constant
Would change the word plastic to the word constant wherever it is found.
opchange -n geo* plastic constantFind all operators whose name begins with geo, changing the word plastic to the word constant.
opchange -t light plastic constantFind all operators of type light, changing the word plastic to the word constant.
opchange -T SHOP plastic constantFind all SHOPs, changing the word plastic to the word constant.
opchange -p /obj plastic constantFind all operators under /obj, changing the word plastic to the word constant.