title: Check if a file is executable
body: <p>I am wondering what's the easiest way to check if a program is executable  with bash, without executing it ? It should at least check whether the file has execute rights, and is of the same architecture (for example, not a windows executable or another unsupported architecture, not 64 bits if the system is 32 bits, ...) as the current system.</p>