<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=437385101-07052003><FONT face=Arial color=#0000ff
size=2>Perhaps you read the first 2 chars of the file and if it's not #! but it
is executable then it's an app????</FONT></SPAN></DIV>
<DIV><SPAN class=437385101-07052003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=437385101-07052003><FONT face=Arial color=#0000ff
size=2>Monte</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
metacard-admin@lists.runrev.com [mailto:metacard-admin@lists.runrev.com]<B>On
Behalf Of </B>Yennie@aol.com<BR><B>Sent:</B> Wednesday, 7 May 2003 11:13
AM<BR><B>To:</B> metacard@lists.runrev.com<BR><B>Subject:</B> Re: Selecting an
application<BR><BR></FONT></DIV><FONT face=arial,helvetica><FONT face=Geneva
color=#000000 size=2 FAMILY="SANSSERIF">FWIW, there are definitely a fair
number of scripts floating around which _are_ executable but don't have a file
extension. For example, most open source project have a file named
"configure". It should really be called "configure.sh" (and you'll see
#!/bin/sh on the first line)... but, well, it isn't. On the other hand, I
can't think of any binary executables that _do_ have extensions, but there's
nothing stopping someone from creating one.<BR><BR>I'm fairly sure you'll get
good results if you 1) check the executable bit and then 2) examine the first
few characters of the file to see if it is a script. If you're adverse to
using #2 to identify executable script files, file extensions should work most
of the time, but there's really no guarantee that files will be named
appropriately.<BR><BR>One thing to remember: if you try to peek at the first
few bytes of files to find scripts, make sure you have read privileges on that
file first.<BR><BR>Also note that there are things such as ".dll" or ".a" or
".lib" which are all considered executables but don't really fit the
"application" sense.<BR><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"
cite="" TYPE="CITE"></FONT><FONT face=Geneva color=#000000 size=2
FAMILY="SANSSERIF">That was the rule I was about to work with, but just to
be safe: can you<BR>think of any other file types in addition to apps that
have no extension?<BR></BLOCKQUOTE></FONT><FONT face=Geneva color=#000000
size=2
FAMILY="SANSSERIF"><BR><BR><BR><BR><BR><BR>------------------------------<BR>Brian
Yennie<BR>Chief Technology Officer<BR>QLD Learning,
LLC<BR>www.QLDLearning.com<BR><BR>PH: (904)-997-0212<BR>EMAIL:
Yennie@aol.com<BR>-------------------------------<BR></BLOCKQUOTE></FONT><FONT
face=Geneva color=#000000 size=2 FAMILY="SANSSERIF"></FONT></FONT></BODY></HTML>