#!/bin/sh set -x PAGE=`echo $2 | sed -e 's/.*#.*page=\([0-9]\+\).*/\1/g'` xpdf $1 $PAGE