/usr/bin/thesaurus2tex is in libbiblio-thesaurus-perl 0.43-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | #!/usr/bin/perl -w -s
eval 'exec /usr/bin/perl -w -s -S $0 ${1+"$@"}'
    if 0; # not running under some shell
our ($c);
use locale;
use strict;
use Biblio::Thesaurus;
my $the = shift;
my $dest = shift || "thesaurus";
my $obj = thesaurusLoad($the);
my $tit = $obj->{title} || $dest;
my $aut = $obj->{author} || "";
my $desc = $obj->{desc} || "";
open(F,">$dest.tex") or die;
binmode(F, ":utf8");
print F qq{
\\documentclass[twoside,portuges]{book}
\\RequirePackage[a4paper,top=3cm,left=2cm,right=2cm,bottom=1.5cm,nofoot]{geometry}
\\parindent 0pt
%\\parskip 3pt
\\usepackage{babel}
%\\usepackage[latin1]{inputenc}
\\usepackage[utf8]{inputenc}
\\usepackage{t1enc}
\\usepackage{aeguill}
\\usepackage{dict}
\\begin{document}
\\title{$tit}
\\author{$aut}
\\date{\\today}
\\maketitle
$desc
\\newpage
\\twocolumn
};
print F $obj->toTex({},{
## -default  => sub { "\n$rel \t".join("\n\t",@terms)},
   -eachTerm => sub { 
       $term = n($term);
       $_ = n($_);
       if(/\w/){"\n\\term{$term}{
  \\begin{description}
  $_
  \\end{description}}\n"} else {"\n\\term{$term}{}\n"}},
    -end      => sub { "\\begin{dictionary}\n$_\n\\end{dictionary}\n"},
##  -order    => ["BT","NT","RT"],
    });
print F q{
\end{document}
};
close(F);
sub n{ my $a = shift;
 $a =~ s/^([#_])/\\$1/g;
 $a =~ s/^([\^])/*$1/g;
 $a =~ s/([^\\])([#_])/$1\\$2/g;
 $a =~ s/([^\\])([\^])/$1*/g;
 $a;
}
__END__
=head1 NAME
thesaurus2tex - ISO-Thesaurus completion and LaTeX translator
=head1 SYNOPSIS
 thesaurus2tex  file.the > file.tex
    -c   to include separators when first letters change (NOT YET)
 pdflatex file
 dicttex  file
 pdflatex file    ## to make file.pdf
=head1 DESCRIPTION
=head2 EXPORT
=head1 AUTHOR
J.Joao Almeida, jj@di.uminho.pt
=head1 SEE ALSO
dicttex   (http://natura.di.uminho.pt)
perl(1).
=cut      
 |