[r6rs-discuss] [Formal] "#! /usr/bin/env" is not "portable." It's Unix-specific.

Jens Axel Søgaard jensaxel at soegaard.net
Wed Nov 15 14:45:43 EST 2006


Alan Watson skrev:
> Jens Axel Søgaard wrote:
>>> Do C files have to start with "#!/usr/bin/cc"?
>>
>>
>> In real life: yes.
>>
>> The reference manual for the C interpreter CInt contains this:
> 
> You are confusing C scripts (run by things like CInt and tcc) and C files.

A tongue-in-cheek questions deservers a tongue-in-cheek answer.

Alan Watson wrote:
 > There are implementation of Scheme that are great for scripting
 > (in the Unix sense), but this does not mean that all Scheme programs
 > are scripts. The #! notation makes no sense whatsoever in the context
 > of a  Scheme that functions like a conventional compiler (i.e., is
 > closer to /usr/bin/cc than /bin/sh).
 >
 > Do C files have to start with "#!/usr/bin/cc"?

Since the discussion is about script, it is implicit that you are
asking about C scripts.

> I have 19968 C files under my home directory (which frightens me 
> somewhat). All of them form the whole or parts of programs. A fair 
> fraction of them contain the entry points for the programs (i.e., the 
> main funcion). None of them start with #!.

How many of them, can be run directly from a Unix-prompt vis sh ?

-- 
Jens Axel Søgaard




More information about the r6rs-discuss mailing list