On Wed, Aug 28, 2002 at 03:58:02PM +0100, Huard, Elise - D C&W Consultant wrote

> using the path, i want to be able to determine whether it is a shell, an
> executable ...

You could check for the executable bit and it not being a directory.

If you want to determine the particular flavour of shell script you
could look for the #! line

alternatively match it's extension against your mime.types file.

but frankly I'd use system().

- Aidan (who also wouldn't be doing it in C, but there you go)

-- 
[EMAIL PROTECTED]  http://www.velvet.net/~aidan/  aim:aidans42
finger for pgp key fingerprint |- - - - - - - - - - - - - - - - -
01AA 1594 2DB0 09E3 B850       | Marklar Domination, one marklar 
C2D0 9A2C 4CC9 3EC4 75E1       | smoking marklar at at time 

Attachment: msg00022/pgp00000.pgp
Description: PGP signature

Reply via email to