#!/bin/bash

N_ARGS=1

if [ "$#" -ne "$N_ARGS" ]
    then
    echo " Usage: `basename $0` filename.ps"
    echo " Create filname_short.ps"
    exit $E_ERR
fi

pippo=$(echo $1 | awk -F. '{print $1}')

if test -e $pippo"_short.ps"
    then
    echo "target file " $pippo"_short.ps already presents!"
    exit $E_ERR
fi

pstops -pa4 '4:0L@.7(21cm,0)+1L@.7(21cm,14.85cm),3R@.7(0,14.85cm)+2R@.7(0,29.7cm)' $pippo".ps" $pippo"_short.ps" 
