Existe um programa chamado test
que testa as condições, e é por isso que você não pode executar o binário. É um shell embutido especificado por POSIX que também existe em muitos outros shells como ksh
(shell Korn) e ash
(shell Almquist). O Bash é feito para (principalmente) estar de acordo com a própria especificação POSIX. O utilitário test
é feito para verificar vários atributos de um arquivo ou para vários testes numéricos e de sequência. Exemplos:
test -e FILE # if the file exists in some form
test -f FILE # if the file exists as a regular file (not a directory, symlink, etc.)
test -n "$str" # if the string has a length greater than 0
test -z "$str" # if the string is an empty string
test "$str" = "foo" # equivalent to 'str == "foo"' in C
test $num -lt 10 # if the number is less than 10
test $num -ge 10 # if the number is greater than or equal to 10
test $num -eq 10 # if the number equals 10
Para encurtar a história, é provavelmente de seu interesse renomear seu programa em vez de tentar executar um arquivo. Bash se recusa a reconhecer a mera possibilidade de existência. ; -)