[Scottish] type of files

Aidan Skinner scottish at mailman.lug.org.uk
Wed Aug 28 16:11:00 2002


--tAmVnWIZ6lqEAvSf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

> 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)

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

--tAmVnWIZ6lqEAvSf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (OpenBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE9bOfnmixMyT7EdeERAnTmAKCFUmN1NZdiH9+vm1QW9agoZPjrxgCfQ/iS
GXvEyhVGVjs7nw8wnJAuHKE=
=N70r
-----END PGP SIGNATURE-----

--tAmVnWIZ6lqEAvSf--