-u considered harmful

cfv at packet.UUCP cfv at packet.UUCP
Wed Jul 27 02:09:15 AEST 1983


In line with the new philosphy of Unix programming (CPSCI 107/Phil 114),
I see a place where it looks like we need to rethink what we are doing.
Instead of installing a '-u' option in every command that might someday
need it (cat -u, lpr -u, herbie -u), generalizing the unbuffered is probably
the best bet so that it can be used consistently over all programs...
Probably the best place for it would be in the shell as a calling line
parameter. My thought would be something like:

    {%,$} =u cat ...

    with the = showing that this is a shell parameter instead of a command
    parameter. Perhaps this could even be extended so that the '=u' could
    be anywhere on the calling line invisibly to the program (parsed along
    with other metacharacters, perhaps).

This thought leads to one other possibility. I have always felt that there
should be some way to tell the shell to turn off metacharacter parsing so you
could pass them to a program easily (something like 'tar xv /usr/l*' comes
to mind. This could be turned on by something like the '=p' parameter, and
we might even want to use a '=P' parameter so it can be selectively turned
on and off, but that would be better done by quotes.

comments?

-- 
>From the dungeons of the Warlock:
					      Chuck Von Rospach
					      ucbvax!amd70!packet!cfv
					      (chuqui at mit-mc)  <- obsolete!



More information about the Comp.unix.wizards mailing list