Subject: argv[0]-based programs (was: Re: uugetty for NetBSD)
To: None <current-users@NetBSD.ORG>
From: matthew green <mrg@eterna.com.au>
List: current-users
Date: 10/31/1996 18:21:25
   Welllll...kinda.  The thing is, it's quite difficult to run an

how is making a symlink "quite difficult" ?

   > uptime/w,
   
   I had no idea uptime and w were hardlinked.  I see no particular reason
   to do it that way, and certainly no reason there couldn't be flags to
   control the behavior.

well, uptime is simply the same as "wc | sed 1q".  i see no reason for
them not to be the same program, but they should probably be fixed such
that either behaviour is available from them.
   
   > zcmp/zdiff, passwd/yppasswd, reset/tset, compress/uncompress,
   > gunzip/gzcat/gzip/zcat, hexdump/od, egrep/fgrep/grep, ex/vi/view,
   > less/more/page, quotaoff/quotaon,
   
   Sigh.  I knew about the gzip family and the vi family, but not the
   others.  (Actually, {un,}compress sounds vaguely familiar; I may have
   heard of it too.)  I don't approve of any of them, absent flags I don't
   know about to override the behavior implied by the name.

well, i _never_ use anything but `gzip'.  `gzip -d' and `gzip -dc' are
what i use instead of gunzip and gzcat (mostly because i've often been
in situations where i only had gzip, and i hate the names  :-).
compress has the same flags as gzip does.  both of these programs should
be given flags to force the gzip/compress part if invoked as one of the
other programs.

the `grep' family have the various command line switches to make them do
the right thing.

vi has -e and -R to make it act as ex or view, respectively.

od and hexdump appear to have the `right' switches also.

passwd has -l (local) -k (kerberos) and -y (nis) switches.

tset should probably have an option added to force the reset
fuctionality, and quotaon/quotaoff should be given flags to
force either behaviuor.

when this thread came up, i thought "i should give our less/more options
to force their behaviour." (the only reason we have a page binary is
that the old more used to also be installed as page -- they don't do
different things ... hmmm does this mean it should act as more if invoked
as page?)

are there any more programs left in this state?


for getty, i think scott reynolds said all that needs to be said.