From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: --script and --quick Date: Tue, 26 May 2015 14:53:47 -0600 Message-ID: <20150526142445521942652@bob.proulx.com> References: <877frvbdqm.fsf@web.de> <87oal79td9.fsf@wanadoo.es> <87iobfs202.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432673665 4516 80.91.229.3 (26 May 2015 20:54:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2015 20:54:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 26 22:54:18 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YxLrb-0004Y0-IB for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2015 22:54:15 +0200 Original-Received: from localhost ([::1]:50202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxLrb-00031o-0z for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2015 16:54:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxLrI-0002yg-8Z for help-gnu-emacs@gnu.org; Tue, 26 May 2015 16:53:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxLrF-0008V5-0f for help-gnu-emacs@gnu.org; Tue, 26 May 2015 16:53:56 -0400 Original-Received: from joseki.proulx.com ([216.17.153.58]:57605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxLrE-0008UD-Hm for help-gnu-emacs@gnu.org; Tue, 26 May 2015 16:53:52 -0400 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 308AE21232 for ; Tue, 26 May 2015 14:53:48 -0600 (MDT) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id 0D0472DC48; Tue, 26 May 2015 14:53:48 -0600 (MDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87iobfs202.fsf@web.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104592 Archived-At: Michael Heerdegen wrote: > =D3scar Fuentes writes: > > Untested: > > #!/usr/bin/emacs -Q --script >=20 > Thanks, but sadly, this obvious seeming thing doesn't do it. In that > case, neither -Q nor --script is respected. >=20 > I read somewhere that the "#!" thing doesn't allow to specify multiple > arguments. Correct. It is an old interface with a lot of history. It is most often coded to accept exactly one argument. Although different systems have implemented it variously. Here is the pertinent parts from the GNU/Linux man page documentation on it. $ man 2 execve execve() executes the program pointed to by filename. filename mu= st be either a binary executable, or a script starting with a line of= the form: #! interpreter [optional-arg] For details of the latter case, see "Interpreter scripts" below. ... Interpreter scripts An interpreter script is a text file that has execute permi= ssion enabled and whose first line is of the form: #! interpreter [optional-arg] The interpreter must be a valid pathname for an executable which i= s not itself a script. If the filename argument of execve() specifi= es an interpreter script, then interpreter will be invoked with the foll= owing arguments: interpreter [optional-arg] filename arg... where arg... is the series of words pointed to by the argv argume= nt of execve(), starting at argv[1]. For portable use, optional-arg should either be absent, or be spec= ified as a single word (i.e., it should not contain white space); see = NOTES below. ... Interpreter scripts A maximum line length of 127 characters is allowed for the first= line in an interpreter scripts. The semantics of the optional-arg argument of an interpreter s= cript vary across implementations. On Linux, the entire string followin= g the interpreter name is passed as a single argument to the interpreter= , and this string can include white space. However, behavior differs on= some other systems. Some systems use the first white space to term= inate optional-arg. On some systems, an interpreter script can have mul= tiple arguments, and white spaces in optional-arg are used to delimit= the arguments. One of the best articles chronicling the details is Sven Mascheck's site. http://www.in-ulm.de/~mascheck/various/shebang/ Bob