Re: RFA: >, >>, and "tee" operators

Andrew Cagney
2002-07-25T17:36:34Z

> I think this was raised before (fernando and I discussed it somewhere on
>> gdb@). GDB is used on systems that are not even UNIX like (namely
>> DJGPP), trying to tie the syntax to UNIX is such a good idea. GDB needs
>> a syntax spec, the current piece meal aproach is regrettable :-(
>>
>> If the command was called ``log'' rather than ``tee'' then I don't think
>> we would have problems with ``log -a''. (I'm not saying that log is the
>> right name mind.)
>
>
> Well, I find the DOS-ish '/' separator much nastier than '-' options.

The `/' would most likely have come from VMS or a precursor. VMS has
[had?] a remarkably well structured (too well structured?) CLI interface
(I show my heritage :-).

> A question of personal taste. ``log'' unfortunately is more like
> ``tee'' than it is like redirection; how about a simple ``redirect''
> command?
>
> redirect [-a[ppend]] FILE [COMMAND]
> log [-a[ppend]] FILE [COMMAND]

Or `log/a FILE [COMMAND]' or, hmm, something like:

set log write FILE
set log redirect FILE
set log append FILE
show log

and

log[/a] FILE command-that-isn't-optional

Same for redirect.

Are you proposing that ``print/FMT'' gets replaced by ``print -FMT''.
There shouldn't be two conflicting syntaxes.

Andrew