#!/bin/sh
if test "*$PROTERMCAP*" = "**"
then 
    exit 1
fi
grep $type $PROTERMCAP 1>/dev/null 2>/dev/null
if test "*$?*" = "*1*"
then
    exit 1
fi
sed -n "/$type|/,/:$/{
/|/s/^./  &/
s/:\\\/:/
s/:/\\
/g
p
}
" $PROTERMCAP | sort -fu > test.out
quoter < test.out > $type.out
