#!/bin/bash set -e set -o pipefail factor=$1; shift pstops "0@$factor" "$@" | perl -p -e 's/\d+/ $& * '$factor' /eg if m/^\%\%.*BoundingBox/'