From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b6f4c34089bbd093,start X-Google-Attributes: gidfee84,public From: Humpty Subject: Detecting File Type Date: 1998/05/20 Message-ID: #1/1 X-Deja-AN: 355101317 X-Sender: humphret@thor.winthrop.edu Content-Type: TEXT/PLAIN; charset=US-ASCII Organization: Info Avenue Internet Services Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 My boss says that he's seen in some institutions the ability to determine the file type of a file, and if it isn't a text file it doesn't get printed. I want to know if this is possible. I know the file command can tell me the file type of a file, but how would I separate the text files from the data files? I've looked in the /etc/magic file but can't see any string that I could match text files with. For instance, I get "English Text" for a text file, but the word text doesn't appear in the description for a C program. Am I going the wrong route, is there a better way of doing this besides using the file command? ..._Tim_... --=[I know everything...just not at the same time.]=-- http://www.shack.org/zzhumphreyt zzhumphreyt@kagi.com