The 2>/dev/null part in the code is used to redirect error messages to a special file called /dev/null, which discards them.
Here's a breakdown:
2refers to the standard error (stderr) file descriptor.>is the redirection operator./dev/nullis a special file that discards all data written to it.
So, when you see 2>/dev/null, it means that any error messages generated by the command will not be displayed in the terminal; they will be sent to /dev/null instead. This is often used to suppress error messages that are not relevant to the user.
