Este é o meu arquivo demo.sh
#!/bin/bash
if [[ $(ls -A) ]]; then
echo "there are files"
else
echo "no files found"
fi
mas quando eu corro isso eu recebo saída como
demo.sh: 3: demo.sh: [[: not found
no files found
mas há algum arquivo neste diretório