Hi Bram,


Your suggested syntax (repeating –a for each field) did work. I made a note on https://wiki.duraspace.org/display/DSDOC3x/Updating+Items+via+Simple+Archive+Format so the documentation can be updated.


Thanks for your help,



From: bluyten@gmail.com [mailto:bluyten@gmail.com] On Behalf Of Bram Luyten
Sent: Thursday, June 27, 2013 1:36 PM
To: Isaak, David C
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] Error when using itemupdate to add multiple metadata fields


Hi David,


just part of the answer bit it may set you on the right track:


the reason why ; breaks your command is because it will tell the CLI to interprete "dc.contributor.y" as a separate command to be executed after the previous part. So I guess that will never work.


what happens if you try:


[dspace]/bin/dspace itemupdate -e joe@user.com -s [path/to/archive] –a dc.contributor.x. -a dc.contributor.y -a dc.contributor.z


instead of 


[dspace]/bin/dspace itemupdate -e joe@user.com -s [path/to/archive] –a dc.contributor.x.;dc.contributor.y;dc.contributor.z

The docs you are referring to are here: https://wiki.duraspace.org/display/DSDOC3x/Updating+Items+via+Simple+Archive+Format right?


I'm not really sure why the note is there about the semicolon. 


hope this helps,






Bram Luyten @mire
2888 Loker Avenue East, Suite 315, Carlsbad, CA. 92010
Esperantolaan 4, Heverlee 3001, Belgium


On Thu, Jun 27, 2013 at 5:40 PM, Isaak, David C <David.C.Isaak@kpchr.org> wrote:



[I am running DSpace 3.1.]


I am attempting to use the itemupdate command to add metadata to three fields at the same time. The command I am using is:


[dspace]/bin/dspace itemupdate -e joe@user.com -s [path/to/archive] –a dc.contributor.x.;dc.contributor.y;dc.contributor.z


When I run this in test mode, all the metadata fields load correctly, but the action (org.dspace.app.itemupdate.AddMetadataAction) is only performed on the first metadata field. At the end of the test run, I see the error:


-bash: dc.contributor.y: command not found

-bash: dc.contributor.z: command not found


I am confident that my SAF packages are correct because itemupdate works correctly when I run the command individually for each metadata field. Is there a problem with the syntax of my command? Am I misunderstanding the manual? Here is the relevant portion of the manual:


-a or --addmetadata [metadata element]

Repeatable for multiple elements. The metadata element should be in the form dc.x or dc.x.y. The mandatory argument indicates the metadata fields in the dublin_core.xml file to be added unless already present (multiple fields should be separated by a semicolon ';'). However, duplicate fields will not be added to the item metadata without warning or error.


Any thoughts would be appreciated.


Thank you,



David Isaak
Digital Projects Librarian

Kaiser Permanente
Center for Health Research
3800 N. Interstate Ave.
Portland, OR 97227
(503) 335-2437




This SF.net email is sponsored by Windows:

Build for Windows Store.

DSpace-tech mailing list
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette