hscript headache

   1492   0   0
User Avatar
Member
54 posts
Joined:
Offline
hello
I'm trying to set the shop_materialpath of an object with the shop_materialpath of another in hscript

cd /obj/myobj
#this is at SOP level
foreach object (`execute(“opls /obj”)`)
echo $object
opadd material ${object}“_mat”
set objmat = `run(“opparm -d /obj/${object}/obj shop_materialpath”)`
echo ${objmat}
# opparm ${object}“_mat” shop_materialpath1
end

so far echo ${objmat} prints this :
>> opparm /obj/ARBRE_02_RACINES1/obj shop_materialpath ( ../shopnet1/mat_`chs(“../style”)` )

-how can I output only this :
../shopnet1/mat_`chs(“../style”)`
and print the result of the expression in an absolute form (it should be /obj/ARBRE_02_RACINES1/shopnet1/mat_mystyle int his case)

thanks for any help
luc
  • Quick Links