I wish I could, but I have to run something (a weird SQL query) on each entry and then replace fragments of the path, so a simple opchange wouldnt work.
I came up with a fairly unsafe (ugly) hack where i opscript it and take an “arg()” a couple of places back to get the parameter name
set nodes=`execute(“opfind -i the_string_i _want”)`
# changing nodes
foreach node ($nodes)
set opscript = `execute(“opscript -b $node”)`
set loop = 1
while ( $loop > 0 )
set thisarg = `arg($opscript,$loop)`
set loop = `$loop+1`
if( `strmatch(“*the_string_i_want*”,“$thisarg”)` > 0 ) #search for string
set oldpath = `chs($node+“/”+arg(“$opscript”, $loop -3))` #chs the parameter name
echo HERE is where i do my parameter subsitution…
endif
if( `strlen(“$thisarg”)` == 0 ) # end of arguments
set loop = 0
break
endif
end
end
ps. would be quite nice to have opfind have a callback like the
find .. -exec … in unix, eh?