Technology and Trends
 USENET Archives
  
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!philabs!seismo!hao!hplabs!sri-unix!L...@SRI-AI.ARPA
From: L...@SRI-AI.ARPA@sri-unix.UUCP
Newsgroups: net.unix
Subject: Unix Bugs and Suggestions
Message-ID: <4737@sri-arpa.UUCP>
Date: Wed, 31-Aug-83 13:15:46 EDT
Article-I.D.: sri-arpa.4737
Posted: Wed Aug 31 13:15:46 1983
Date-Received: Sun, 4-Sep-83 00:09:20 EDT
Lines: 280

From:  Ken Laws <L...@SRI-AI.ARPA>

The following are gripes and suggestions that I have accumulated
over several years.  Some may no longer be pertinent, or may never
have been pertinent to systems other than the one I am using.  I
operate in a VAX EUNICE environment emulating Berkeley 4.1c UNIX.
I normally use the csh shell.

					-- Ken Laws




10-Jul-82  Laws at SRI-IU
The APL batch interpreter requires different (and incorrect) syntax
from that required by the interactive interpreter.  For instance,
results do not print unless explicitly assigned to a quad.  There
seems to be a problem with the local variable declaration mechanism.
Statement labels do not work properly.  The .sg operator for negation
is undocumented, making it very difficult to enter a number with a
negative exponent.

10-Jul-82  Laws at SRI-IU
The history mechanism has a flaw.  "!26:0 !:1" fails to pick up arg
1 from command 26, despite what the csh documentation says.
Also, the form !!:s/l/r/ doesn't permit a * or \* in the l string;
evidently the history parser tries to break at the *.  (Minor point:
the csh man page documents s/l/r/ as "substitute l for r" when it
is really "substitute r for l".)

16-Jul-82  Laws at SRI-IU
The new standard I/O package seems to be incompatible with the
"script" command.  It buffers program output, making it impossible
to carry on a conversation with an interactive process.  On EUNICE
this has been fixed so that script files look like ttys to the
I/O routines and every line is flushed.

21-Jul-82  Laws at SRI-IU
BTW, what does "rc" mean?  Unix always uses rc files for
initialization, and no one seems to know the mnemonic.

26-Jul-82  Laws at SRI-IU
A "vfree" capability is needed for image processing work, as is
a contiguous storage mechanism.

26-Jul-82  Laws at SRI-IU
I-nodes should store additional bits indicating which names
are directories and which are shell scripts.  These should be
flagged by the ls command much as ls -F now flags directories.
Having the extra bits would speed up the ls -F command and
should speed up some shell actions as well.

26-Jul-82  Laws at SRI-IU
The find command should offer a "depth" limit so that one could
more easily specify an action to be performed on all of the
first-level children of a particular directory.  Also, it is
awkward that the action performed by -exec is done in the invoking
environment and not in the environment of each selected file.
(Perhaps both types of -exec are needed.)  I have tried passing
"(cd {}; <command>)" to a "find . -type d", but there is no way
to quote the semicolon without also hiding the {} so that find
can't substitute the directory name.

26-Jul-82  Laws at SRI-IU
The command "rm -f *.o foo.txt" will bomb it there is no .o file
available.  It would seem more logical for the command to bomb
(if at all) only when the entire argument list is null.  Another
place this causes trouble is with "cc -o tst tst.c *.o -I...",
which bombs if there is no .o file.  I don't even want to see a
complaint from the shell, much less have it skip the command.
(This is different from "set nonomatch" in that it would omit
the unsatisfied substitution instead of leaving it in the command
line.)

26-Jul-82  Laws at SRI-IU
The csh syntax {a,b,c} is inconsistent with the normal argument
syntax of "a b c".  This interferes with using the `` mechanism
within {} to generate lists of things for shell commands to operate
on.  (Personally, I would like to see the comma form made legal
as well as the standard space form.  See the next comment.)
It also makes it difficult to format a command script nicely by
breaking lines with an escaped newline (i.e. \
because no space is allowed to come between the comma and the
next entry.

26-Jul-82  Laws at SRI-IU
The shell argument-passing mechanism should be augmented so that
a null argument could be indicated using successive commas.  The
shell would then also need syntax for testing whether an argument
was missing (as opposed to null).  This would give the necessary
hook for writing shell scripts with default arguments.

26-Jul-82  Laws at SRI-IU
The -I/dir/include syntax in the cc command, and similar flags for
other programs, are awkward because the shell can't expand the
variable in -I$var.  This could be alleviated by allowing a space
following the -I flag in the manner of most other UNIX flags.

27-Jul-82  Laws at SRI-IU
Now that UNIX is becoming a user environment, it would be helpful
to have a "nomagic" switch for the csh as there is for ex.  (This
is different from "set noglob" in that expansions could still be
invoked by quoting the special symbols.)  I would particularly
like to turn off magic handling of ? and ?? since they are seldom
used as wildcards and would be very useful as query arguments
to interactive programs.  (I would also like to use ?> as an
abbreviation for " ? ? ? ? ...", which means that "nomagic"
would have to allow the ?> syntax.)

13-Aug-82  Laws at SRI-IU
The code for whatis.c is redundant with that in man.c.  The
whatis command could now be replaced by a shell script invoking
man -f the way that apropos invokes man -k.  (Alternatively, the
man options could be dropped and apropos and whatis could both
be made separate programs.)  BTW, the error message in man
misspells "appropriate" as "apropriate".

27-Aug-82  Laws at SRI-IU
The which command does not expand aliases.  This can be very
confusing when it reports that one version will be executed
but another actually is.

11-Sep-82  Laws at SRI-IU
The spell command does not accept a -x command as documented.
It passes the x on to deroff, which can't handle it.

27-Sep-82  Laws at SRI-IU
The apropos and man systems sometimes don't coordinate.
You cannot tell from the apropos lines for feof, fabs, or strlen
what name you should give to man to get the full details.

27-Sep-82  Laws at SRI-IU
There should be a command similar to whatis that gives the
synopsis line of a program.

04-Oct-82  Laws at SRI-IU
The shell usurps the () symbols to denote lists of commands.
While this is a valuable function, I would also like to see
arguments which can be lists of subarguments.  The only
mechanism currently available is to flag each argument type
and to detect the end of the list by locating the next flag.
Such parsing gets very tricky when the order of the major
arguments is not fixed.  It would be so much easier if the
shell accepted "command -s (size1 ...) -n (name1 ...)" and
either kept the subarguments intact in the argv list or
recursively parsed them in lists pointed at by the argv list.

04-Oct-82  Laws at SRI-IU
The other major capability I see lacking in the UNIX philosophy
is property lists.  I would like to be able to annotate any
object, particularly files and directories, with comments,
applicable handler routines, backup tape archive name, etc.
I would like to see a property list concept similar to that
in LISP developed.  It shouldn't be very hard to associate
some kind of .prop file with every current UNIX file type.

15-Oct-82  Laws at SRI-IU
If you set a shell variable to a null string, "set a =", and
then ask "echo $#a", you get 1 instead of the correct 0 length.
The command "set a = `alias foobar`" gives a correct length of 0
when no alias exists.

18-Oct-82  Laws at SRI-IU
Ctags gets confused by any line which starts on the left margin
and contains a parenthesis, even if that line is inside a comment.

20-Oct-82  Laws at SRI-IU
Redirecting the standard output of a process to a log file
works fine, but doing a cat on the file will show nothing
until enough output has been generated to produce a buffer
dump.  It would be nice if a log file could be given the same
I/O buffering as a tty.

21-Oct-82  Laws at SRI-IU
It looks like the man program may have a problem, although it
hasn't caused us trouble yet.  The "search" section of the
manual() subroutine in /usr/src/cmd/man/man.c appends various
letters to the command.section string in the "work"
vector.  It neglects to put a 0 (NULL) in the following slot, so
that the action of the "stat" command depends on what garbage
was in the buffer previously.

21-Oct-82  Laws at SRI-IU
The !* history mechanism is apparently quite useful for passing
an argument list into an alias, as in

    alias foo "bar1; bar2 \!*; bar3"

It seems, however, that !* is not documented in the csh man page.
This should be done.

11-Nov-82  Laws at SRI-IU
The shell should respond to a ^U rubout with a new prompt symbol,
at least on terminals that do a LF and not just a CR.

12-Nov-82  Laws at SRI-IU
The man facility really should use tbl and neqn when formatting
files so that we could include tables and equations.  Also, it
should be better documented somewhere (e.g., in the man page for
man itself) that the man macros are those in the -man package and
are documented in man(7).

18-Nov-82  Laws at SRI-IU
The practice of creating a "lock file" to prevent multiple access
to a particular operating system service (e.g., the printer) is
somewhat awkward.  It is sometimes possible to wedge a server
if you kill a process during the time that the lock file exists
since the operating system does not support named "temporary" files
that are deleted if the process dies.  Perhaps UNIX should support a more 
fundamental locking mechanism, e.g. an "unsharable" file protection
mode or I/O access mode which would prevent more than one user
having write access at once.

18-Nov-82  Laws at SRI-IU
Denying write access to a file is not particularly meaningful if
the user can move the file where no one will ever find it (e.g.
/tmp/.tmp) and replace it with a new file.  While this can be
prevented by manipulating permissions to the directory itself,
it might be worthwhile to modify the mv command (and the routines
it uses) to refuse to move a write-protected file.

27-Nov-82  Laws at SRI-IU
There should be a way of flagging .cshrc commands that are to apply
only to explicit shell invocations (e.g., via the csh command) as
opposed to those needed for both interactive and background
processes (e.g., shells sprouted by make).

29-Nov-82  Laws at SRI-IU
The history mechanism should be able to repeat an entire foreach
command, not just the first line.

29-Nov-82  Laws at SRI-IU
Evidently the Berkeley grep command takes a -y for case fold search
instead of the documented -i.  The documentation should be
upgraded.

30-Nov-82  Laws at SRI-IU
The use of the name line in each man page to generate keywords for the
apropos system is not optimal.  It forces the documentor to make absurd
entries like the "sh" name, which includes every built-in shell command,
or to omit valuable keywords as in the "csh" entry.  It discourages the
documentation of libraries as units, and encourages separate and redundant
documention of trivial little subroutines.  It leads to man pages such as
string(3) and floor(3m) where the name of the man page is difficult
to determine from the apropos line.  One solution would be to have a
separate (and optional) "INDEX" or "KEYWORD" entry in each man page in
which the documentor could store keywords to be added to those in the
name line.  Apropos would search both the KEYWORD and NAME fields, but
would only print the NAME field.

21-Dec-82  Laws at SRI-IU
The "make" system does not expand .cshrc aliases, and is unable
to execute an "alias" command.  To get around this, put in something
like "@csh -v -c "<aliased command>".

27-Jan-83  Laws at SRI-IU
Do not use a $shellvar as a library name in a cc command if the
set shellvar = "..." command (with quotes) has a \<Carriage Return>
in it.  The loader will complain about premature EOF.

31-Jan-83  Laws at SRI-IU
It is absurd (and a real pain) that ranlib must be run every time
a file is archived (or deleted!) or an archive is moved.  If this
kludge is really necessary, it should be built into ar, mv, and cp.

03-Feb-83  Laws at SRI-IU
The documentation of "news" omits the -s argument for sending
a file to the news directory.

06-Apr-83  Laws at SRI-IU
Normal use of the the make system's intelligence has a minor
bug:  If running make produces linker errors because a library
is missing in a compile command, and if you edit the makefile
to add the library name, the make system may be fooled into
saying that all its files are now up to date.  The problem is
that the makefile itself, rather than any of its inputs or
outputs, has changed, and this change makes some of its outputs
obsolete.  Possibly the make system should check the date of
the makefile as well as the dates of its associated files.
-------

Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!philabs!seismo!hao!hplabs!sri-unix!edhall@rand-unix
From: edhall@rand-u...@sri-unix.UUCP
Newsgroups: net.unix
Subject: Re: Unix Bugs and Suggestions
Message-ID: <4803@sri-arpa.UUCP>
Date: Thu, 1-Sep-83 16:58:00 EDT
Article-I.D.: sri-arpa.4803
Posted: Thu Sep  1 16:58:00 1983
Date-Received: Sun, 4-Sep-83 23:35:50 EDT
Lines: 24

At least half of your complaints concerned problems with CSH.
After two years working with and learning about that monstrosity
I finally have to vent some steam over it.

The C-shell hardly deserves to be called `UNIX'.  It has a wealth
of features, each one not quite fully implemented and each with
an arcane syntax which, if it is similar to that of other features,
is just different enough to thwart the user's intuitions.  It is
clearly an effort of several individuals, each with their own `idea'
of what it should be.

The Bourne shell may not have some of the features, but it is clean
and elegant.  Its facilities don't seem to be at war with each other.
I almost always use it for scripts, as it seems to be much more of
a *programming language*.  By comparison, C-shell is just a grab-bag
of hacks.  (Useful hacks, to be sure...)

Don't get me wrong; I *use* C-shell as my interactive shell.  History,
job-control, and aliasing are all productive features for me.  But
someone, somewhere, has to have done a better job with them.

		-Ed Hall
		edhall@rand-unix
		decvax!randvax!edhall