[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request - ganged file test switches
From: |
Chet Ramey |
Subject: |
Re: Feature request - ganged file test switches |
Date: |
Tue, 12 Aug 2014 16:36:58 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 8/9/14, 7:07 AM, Steve Simmons wrote:
> Advance apologies if this has already been discussed and rejected.
It hasn't.
> It would be nice to have ganged file test switches. As an example, to test
> that a directory exists and is properly accessible one could do
>
> if [[ -d foo ]] && [[ -r foo ]] && [[ -x foo ]] ; then . . .
>
> but
>
> if [[ -drx foo ]] ; then . . .
>
> is a lot easier.
Sure, but it's only syntactic sugar.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/