-x FILE (conditional operator)
true
if the file exists and is executable by you, i.e. the current user.
Links
Examples
- Different ways to test if a file is executable:
1 2 3 4
test -x ~/file && echo "executable" [ -x ~/file ] && echo "executable" # Bash [[ -x ~/file ]] && echo "executable"
BashSupport Pro is a Bash IDE with support for -x – try it now!