#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage: shoot.window win_name"
exit
fi
clear
sleep 5
xwd -nobdrs -name $1 > /tmp/FOO
xpr -portrait -psfig -scale 3 /tmp/FOO > /tmp/screen.eps
rm /tmp/FOO
# edit out the "showpage" at the end of the file
ed /tmp/screen.eps << FOO
g/showpage/s/showpage/%%showpage/
wq
FOO
