Selecting an application
Yennie at aol.com
Yennie at aol.com
Tue May 6 22:46:01 EDT 2003
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.
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.
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.
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.
> That was the rule I was about to work with, but just to be safe: can you
> think of any other file types in addition to apps that have no extension?
>
------------------------------
Brian Yennie
Chief Technology Officer
QLD Learning, LLC
www.QLDLearning.com
PH: (904)-997-0212
EMAIL: Yennie at aol.com
-------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20030506/51332b44/attachment.htm
More information about the metacard
mailing list