From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 15 May 2010 14:44:57 -0400 To: 9fans@9fans.net Message-ID: <9dcee8caaa4a849405bea1ebf18488aa@kw.quanstro.net> In-Reply-To: References: <20100515064140.3131a139@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [9fans] -- in rsc's g script Topicbox-Message-UUID: 228e5a8e-ead6-11e9-9d60-3106f5b1d025 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