Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to get extended attribute to a perl variable
Anil Kumar
I'm able to set extened attribute as below
$cmd = "$IWHOME/bin/iwextattr -s TeamSite/Metadata/SEO/Description=$metaDescription \"$file\"";
$log->debug("cmd = $cmd");
$out = `$cmd`;
$log->debug("out = $out");
If I want to get, and see what value is present previously and want to manipulate based on value... So, If I can store in perl variable, I can play with it. But How to get the value into a perl variable.
Thanks, Aneel
Find more posts tagged with
Comments
sheikh1
What??
When you able to set using -s flag cant you get using -g flag??
my $value = "$IWHOME/bin/iwextattr -g TeamSite/Metadata/SEO/Description \"$file\"";
Anil Kumar
I knew using -g option. Actually I wanted to how to trigger this command, even for -s....
In a perl file, the command is stored in a variable $cmd and assigned $out..
So,, when they assign $out = $cmd means command is executed.
Yeah, its a silly Q.
paul_iwov
1) include the below line in your script and it will execute the command $cmd directly
`$cmd`;
2) to capture the output to a variable use the below
my $cmd = qx ( );
Anil Kumar
Yeah Got it. thanks,
KhushiAgrawal
Hi,
You can try the below one
I:/iw-home/bin/iwextattr -s adminPath=Y:/Need to have path till admin/admin/ Y:/Need to put path of where your datacapture is present/datacapture.cfg
I:/iw-home/bin/iwextattr -s SetMetadata=true Y:/Need to put path of where your datacapture is present/datacapture.cfg
run the above cmd and this will set your metadata for the template