lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wednesday 08 December 2004 11:47, Adrián Pérez wrote:
[...]
> After thinkign a bit about that, there's a tricky situation.  A .lua
> script with a shebang in the first line (like "#! /usr/bin/lua) and
> marked as executable: does it continue to be "inert text" or is it
> "alive code"?? In my opinion it's alive, as it contains code (even
> without the shebang and not having execute permission it would be code,
> indeed).

One reason for the distinction is to distinguish platform-independent 
executables from platform-dependent ones. On a lot of Unix systems, each 
machine would NFS mount a large number of directories from a variety of 
servers, where you might have several types of machine. There were a number 
of techniques for making sure that each machine ran the right kind of binary 
--- the simplest of which was just replacing the binaries in /usr/bin with 
something like:

#!/bin/sh
exec /usr/bin/`arch`/progname "$@"

...but of course this wasn't necessary for platform-independent scripts. 
Libraries were treated similarly.

The Linux Filesystem Standard (http://www.pathname.com/fhs/pub/fhs-2.3.html) 
states that /usr/lib is supposed to contain 'object files, libraries, and 
internal binaries', while /usr/share is supposed to contain 
platform-independent data, which scripts would count as.


-- 
+- David Given --McQ-+ 
|  dg@cowlark.com    | "I tried Zen once, but I understood it." ---
| (dg@tao-group.com) | Anonymous
+- www.cowlark.com --+