Chet Ramey wrote:
On 8/21/17 9:27 AM, Greg Wooledge wrote:You could write your own helper functions for this:-fx() { test -f "$1" && test -x "$1"; }This is indeed a quick and easy way to implement desired functionality. Shell functions can do a lot.
---- Alas, they don't work inside [[...]] with other file-test operators: [[ -fx /bin/ls && -s /bin/ls ]] && echo ok -bash: conditional binary operator expected -bash: syntax error near `/bin/ls'