Run bash command and capture the stdout