The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: norman@oclsc.org (Norman Wilson)
Subject: [TUHS] Command line post-arguments with #!
Date: Wed, 14 Dec 2011 18:57:39 -0500 (EST)	[thread overview]
Message-ID: <20111214235740.04D421DE369@lignose.oclsc.org> (raw)

Sven Mascheck:

  Well the original implementation (post 7th ed and 4.0/4.1 BSD)
  didn't allow arguments at all ;-)

======

I believe you're mistaken.  All the implementations I've
ever used allowed a single argument in the #! line,
and inserted the name of the script between that (if
present) and the arguments given to exec.

e.g. if ./lipsum began with

	#!/usr/bin/awk -f

awk would be invoked with `/usr/bin/awk -f ./lipsum ...'.

Without allowing one argument for -f or the like,
#! wouldn't have been useful for much but the shell.

Norman Wilson
Toronto ON



             reply	other threads:[~2011-12-14 23:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 23:57 Norman Wilson [this message]
2011-12-15  0:25 ` Sven Mascheck
  -- strict thread matches above, loose matches on Subject: below --
2011-12-15  1:46 Norman Wilson
2011-12-15  3:07 ` Sven Mascheck
2011-12-08 23:08 [TUHS] speak.c, or sometimes the bits are under your nose Warren Toomey
2011-12-12  8:13 ` Jonathan Gevaryahu
2011-12-13  3:08   ` [TUHS] Command line post-arguments with #! Random832
2011-12-14 23:36     ` Sven Mascheck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111214235740.04D421DE369@lignose.oclsc.org \
    --to=norman@oclsc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).