9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] -- in rsc's g script
Date: Sat, 15 May 2010 14:44:57 -0400	[thread overview]
Message-ID: <9dcee8caaa4a849405bea1ebf18488aa@kw.quanstro.net> (raw)
In-Reply-To: <AANLkTimGg-IqMgWGfISeU6v0XGzl1Ub5qPQG05G7eufc@mail.gmail.com>

On Sat May 15 09:54:25 EDT 2010, rudolf.sykora@gmail.com wrote:
> > '--' tells the Plan 9 program argument parser to stop looking for
> > options.  See arg(2).
>
> so is it a program dependent feature in the sence that I must know
> which program uses arg(2) and which does not?
> (E.g that grep uses it but some other command (is there any?) does not?)
> Must I read the program's source or should it be documented in man
> pages? -- there is nothing about this in the man page of grep...

for the record, grep also accepts -e which escapes the next option.

here's a list of all the single-file commands in /sys/src that don't
use ARGBEGIN/ARGEND.  compiling a comprehensive list is
an exercize left to the reader.  of course, only a hand full of
shell scripts use getflags and conform to the general convention.

- erik

---

 ; x=`{grep -l ARGBEGIN *.c}
; for(i in *.c) if (! ~ $i $x) echo $i
ar.c
awd.c
basename.c
cal.c
cat.c
chmod.c
clock.c
dd.c
echo.c
factor.c
fortune.c
getmap.c
html2ms.c
join.c
kbmap.c
kprof.c
lens.c
mc.c
msleep.c
mv.c
p.c
pbd.c
pr.c
pwd.c
sleep.c
sort.c
swap.c
tail.c
test.c
time.c
tprof.c
uniq.c
unlnfs.c
unmount.c
xd.c



      parent reply	other threads:[~2010-05-15 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 13:16 Rudolf Sykora
2010-05-15 13:37 ` Steve Simon
2010-05-15 18:50   ` Richard Miller
2010-05-15 13:41 ` Robert Ransom
2010-05-15 13:53   ` Rudolf Sykora
2010-05-15 14:27     ` Steve Simon
2010-05-15 18:44     ` erik quanstrom [this message]

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=9dcee8caaa4a849405bea1ebf18488aa@kw.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).