![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I may be a librarian now, and I may be a tcsh user in my every day life, but apparently I still can flex my bash-fu when I have to. Yay for line noise!
export j=1;for i in `ls M*.xml`; do k=${foo-`echo $i|cut -f1 -d.`}; mkdir item_$j;cp ${k}.xml item_$j/dublin_core.xml; echo ${k}.jpg>item_$j/contents;cp
../streams/${k}.jpg item_$j;let j++;done
export j=1;for i in `ls M*.xml`; do k=${foo-`echo $i|cut -f1 -d.`}; mkdir item_$j;cp ${k}.xml item_$j/dublin_core.xml; echo ${k}.jpg>item_$j/contents;cp
../streams/${k}.jpg item_$j;let j++;done
no subject
Date: 2007-03-14 11:31 pm (UTC)no subject
Date: 2007-03-15 01:36 pm (UTC)(That's the shell one liner that, given a directory of jpegs named [foo].jpg and a directory of dublin core encoded in xml named equivalently [foo].xml, creates the files and directory structure necessary for a dspace batch ingest.)