Small introspective program

Oliver Laumann net at opal.cs.tu-berlin.de
Fri Mar 15 23:10:55 AEST 1991


In article <15462 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
> >And in any sh|csh|tcsh on unix, this one is about as short as you can get:
> >        cat $0
> 
> No, the program contained between the following quotation marks is shorter: ""

Hmmm...

% /bin/sh
$ > foo
$ chmod +x foo
$ ./foo
Cannot exec binary file.
sh: ./foo: cannot execute
$ ^D

This is what happens under SunOS 4.1.  Yes, I know, the original
poster said "on UNIX", but I found the fact that the SunOS shell
refuses to execute an empty file so funny that I wanted to share
it with you.

Don't tell me that this has something to do with the fact that Sun
switched to POSIX with SunOS 4.1...



More information about the Comp.lang.c mailing list