Subject: Re: misc/23729: Syntax error: "(" unexpected
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Alan Barrett <apb@cequrux.com>
List: netbsd-bugs
Date: 10/09/2006 20:00:15
The following reply was made to PR misc/23729; it has been noted by GNATS.

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org, netbsd-bugs@NetBSD.org
Cc: 
Subject: Re: misc/23729: Syntax error: "(" unexpected
Date: Mon, 9 Oct 2006 21:59:13 +0200

 On Sun, 08 Oct 2006, Christos Zoulas wrote:
 > |  The behavior exhibited by sh and ksh is historic, but hasn't been
 > |  useful since #! was invented, which was a long time ago.
 > |  
 > |  Probably the best thing to do is to remove it.
 > 
 > And what happens to shell scripts that don't start with #!?
 
 If you tell the shell to treat them as scripts, via 'sh filename', they
 should work.  If you tell the shell to exec them, via 'sh -c filename'
 or just 'filename' from inside a shell, then I think you should get an
 exec failure, just as if you did execlp("filename", "filename", NULL).
 
 --apb (Alan Barrett)