get the list and delete the extended attributes of each page according to the list
Hi.
I'd like to create the following shell script.
1)get the page list including the pages which have specific extended attributes.
Target pages could have 3 extended attributes.
TeamSite/LiveSite/Id
TeamSite/Metadata/CreationDate
TeamSite/Metadata/Locale
and then
2) I'd like to delete all of the extended attributes for each pages.
Could you give me any advices for it?( ex) which iw command with option i should utilize...)
Thank you very much in Advance.
Naoki
Answers
-
Depending on the size of your branch, brute force may be the best approach.
iwextattr will perform the changes, you will need to get the list of EAs and then process.
I would use the -x option (get/set all EAs in an XML structure)
iwextattr -h
Usage: iwextattr [-c | -s attr=value | -g attr | -d attr | -e | -l] [-f] [-r ] [u] [x] vpath
Set, get, or delete extended attributes of the file, directory,
branch, edition or WORKAREA specified in the vpath.
The vpath is in the form:
[//server]/archive{[/branch]+}/{EDITION,WORKAREA}/dirpath
-h Print this message.
-v Print version string.
-s attr=value Set to .
-s attr Set reading value from stdin.
-g attr Get the value of .
-d attr Delete attribute .
-c Clear (delete) all EAs for this file.
-e Enumerate attribute names.
-f Input value for attribute via stdin.
-l List attributes and values.
-r Use to filter attribute names (requires -l or -e)
-u Encode/decode EA values to/from UTF8 on input/output.
-x Read and write XML with -s and -l options.
If no option is specified, attributes are listed as with -l.0 -
Hi Andy,
Can you help me in providing the complete script for getting and setting the attribute as per the following steps:
create a .ipl file (just the extension is ipl)
Let the ipl file take a command line argument of a folder
read all files in the folder (including child folders) and keep in an array
for each file in an array get the attribute of the file (ise iwextattr - g command) , store the output to $contents variable
write the $contents to some txt file (output.txt)
each line in output file has filename, Extended attribute name, extended attribute value
then create a new file setattributes.ipl , that read the output file(output.txt)
reads each line in the output file
use iwextattr - s to ser name and value for the given filename
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.