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

From: Jens Axel S�gaard <jensaxel>
Date: Wed Nov 15 14:48:02 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
Received on Wed Nov 15 2006 - 14:45:43 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC