"Suan Chuah" <20*0*5*
2@s*u*e*t*u*a*e*u*a*> wrote:
> Hi Michael, may you please explain the difference between the usage of dev/null and dev/stderr that you covered in lectures? What is the purpose of using these?
Hi Suan,
They are both places where standard output, e.g. from echo, can be redirected. /dev/stderr (don't forget the first '/' ) is standard error output (for error messages), while /dev/null is literally nowhere, a black hole, which simply gobbles up whatever data you send there, and that is used for outputs that you are not interested in seeing, but can't otherwise avoid.
Cheers
MichaelW