#!/bin/bash if [ $# != 1 ] ; then echo "Usage: ./download_metadata_temp.sh doc_id" 1>&2 exit 1 fi doc_id=$1 output_file="metadata_temp.xml" output_cmp_file="compact_metadata_temp.xml" echo "Retrieving metadata: $doc_id -> $output_file" echo "" ../dapiclient2-extended-META.pl "$doc_id" > "$output_cmp_file" xmllint --format $output_cmp_file > $output_file