#!/bin/bash
STARTLINE=`head -n 1 $4`
if [ "$STARTLINE" = '<!doctype linuxdoc system>' ]
then
    echo "sgml2txt"
    sgml2txt $@
else
    echo "sgmltools"
    sgmltools --backend="txt" $4
fi
