TY=$1
FS=`nof $TY`

case $# in
 1) Detref $TY
    echo -n " Donnez la reference principale:  "
    read prin ;;
 2) prin=$2 ;;
esac

testfZ $FS
op-e $FS $TY 7 4 $prin > .T/tmp.sel
awkpr1 < .T/tmp.sel > .T/list.sel
fgrep -v -f .T/list.sel $FS >> .T/tmp.sel

vi .T/tmp.sel

echo -n " Recopie sur $FS (o/n) ?  "
read rep
case $rep in
 o) mv .T/tmp.sel $FS
    tri $FS
    msj_cnt $TY ;;
 n) ;;
esac

rm .T/list.sel
