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