
Previous code would fail if cd echoes the tathet directory to stdout, which is pretty common. Redirecting its output to /dev/null solves the problem.
Previous code would fail if cd echoes the tathet directory to stdout, which is pretty common. Redirecting its output to /dev/null solves the problem.