Slow Bash Script