file extension

file extension name

Returns all of the characters in name after and including the last dot in the last element of name. If there is no dot in the last element of name then returns the empty string.


AMG: http://www.fileinfo.net/ can be used to make sense of many common and uncommon file extensions.

Its entry for .tcl [1 ] is rather curious:

Script written in the Tool Command Language (pronounced "tickle"), a simple textual language used for sending commands to text editors, debuggers, and shells

So... how does Tcl send commands to text editors, debuggers, and shells?

LV Check out Ousterhout's original 1990 USENIX paper. My guess is that someone read this paper, which discusses the use of Tcl as a C library for implementing an embedded mini-language within the context of a larger program such as a text editor, debugger, etc. In that context, one writes things in the mini-language to trigger actions within the larger program - a sort of sending of commands to them, in one sense.

Of course, while that was the original idea behind Tcl, many more uses have grown up for the language. Perhaps someone could mail the maintainer of that site an updated description...


AMG: [file extension] and [file rootname] behave somewhat strangely (though still in accordance with their definitions) when operating on Unix "dotfiles" (files whose names begin with dot). When the dotfile has no extension, as you or I would define the term, [file extension] sees the entire filename as the extension, and [file rootname] returns empty string.