NAME gettyp - get type of file (character or binary) SYNOPSIS type = gettyp (name) character name(FILENAMESIZE) integer type returned as ASCII, LOCAL, BINARY DESCRIPTION 'Gettyp' determines whether the file specified by 'name' is ascii characters, local characters (if different from ascii), or binary. The type is returned as ASCII, LOCAL, or BINARY in the functional call. IMPLEMENTATION A file's type may be determined by locating system information about the file, or 'gettyp' might have to actually open the file and read part of it, making a reasonable 'guess' as to its flavor. The shell uses 'gettyp' to determine whether a command verb given by the user represents a script file or an executable tool. If the file turns out to be a character (i.e. script) file, the shell then spawns itself with the file as input. Thus, if 'gettyp' could not be reliably implemented on a particular system, the user would have to specifically execute her script files by: % sh script ... 'Gettyp' may also be called by the archiver to store a file's type in the archive header (for informational purposes only). This primitive is not considered finalized. Most likely, another primitive will be specified which is used to pick up an assortment of information about a file. 'Gettyp' is temporarily used by the shell until the final version is specified. SEE ALSO DIAGNOSTICS ERR is returned if the file does not exist