The thing to remember is that there really is only one file type in real UNIX: a vector of bytes. Extensions etc are conventions only; real UNIX doesn't have a mechanism that associates a file with some particular tool or executable; all the tools, theoretically, should work on any file. (This isn't as true as it was in the Good Old Days, but that's still the basic design theory.)
What you do to associate a file with a particular tool is have an appropriate "magic number" as the first 16 bits of the file. The most common example of that, by far, is the "shebang line": the one that starts #!
as the first two characters. That particular magic number indicates a file that is to be interpreted or processed with some other tool, and while it's most commonly used for interpreters like bash, perl, or Python, it will work with most everything.
For some of the others, see man magic
and man 1 file
.
(I think it would even work with, say, wc. I'll try it in a second and update.)
UPDATE
Sure enough, it does. Here's my example:
This is my Clozure Common Lisp init file, just because it was handy, copied to a file wctry, with a shebang line to run wc -w, followed by executing the file.
$ cat wctry
#!/usr/bin/wc -w
(format t "In init file.")
$ ./wctry
7 ./wctry
$