PePa wrote:
In that case, would not [[ =fx $file ]] be more workable and in line
with common GNU short commandline option practice??
Do you mean '-fx' ? I assume you are meaning as an alternate?
It would be fine with me, even better on an aesthetic sense, however,
Bash already has multi-character ops starting with a dash.
While "-ge $file" could probably be parsed reliably apart from
"$file2 -ge $file", they look similar to a human and might create
more confusion than help. (-ge $file == exists & groupid set), vs
testing contents of integer vars $file2 and $file for integer-var $file2
being greater-than-or-equal to integer-var $file.
Leveraging the curly brace format, implying [[ -{g,e} $file ]] would be
similar to the quoted example I mentioned. I.e. -- it would be
a matter of applying brace expansion even though quotes didn't exist.
I.e. instead of:
eval 'test -'{g,e}' /bin/ls && :' && echo executable file
one could remove the eval, quotes and extra '&& :' at the end and
use:
test -{g,e} /bin/ls && echo executable file
I _think_ people who are familiar w/brace expansion would
easily understand this new form and not confuse it with
existing features.
Does that make sense?
-l