#!/bin/bash if [ $# != 1 ] ; then echo "Usage: ./COMPX520-RUN-NUMPAGES.sh doc_id" 1>&2 exit 1 fi doc_id=$1 output_file="download-numpages/$doc_id.txt" echo "Retrieving doc-id-page: $doc_id -> $output_file" echo "" ./dapiclient2-extended-NUMPAGES.pl "$doc_id" > "$output_file"