bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test -t FD vs. [FD]


From: Paul Eggert
Subject: Re: test -t FD vs. [FD]
Date: 20 Jun 2003 21:07:46 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Dan Jacobson <jidanni@jidanni.org> writes:

> $ man test
>        -t [FD]
>               file descriptor FD (stdout by default) is opened on a terminal
> I.e. argument optional
> 
> $ help test
>         -t FD          True if FD is opened on a terminal.
> Not so optional with bash then.
> 
> You guys should unify them.

POSIX long ago decided that FD is not optional with test -t.  GNU
'test' conforms to POSIX in this respect.  This means GNU 'test' is
incompatible with ancient Unix 'test', but that's life in the big
city.  The original specification had an ambiguous grammar, and POSIX
removed the ambiguity by making FD required.

Reference:
http://www.opengroup.org/onlinepubs/007904975/utilities/test.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]