What does the || true do in the mesg command do?
mesg n || true
Found this mseg command in a .profile that causes an error when logging into the user on lightvm. I would like to know what mesg n || true is doing. I understand that the mesg n is a do not disturb but I do not understand the || true part. What does the || true do in the mesg command do? |
It forces the whole expression to exit with a success status: The operator "||" means the command to the right is only executed if the command beforehand exited with a "failure status" (exit code != 0). The "true" command does nothing but exit with exit code 0 which means "success".
|
Thank You.
|
All times are GMT -5. The time now is 12:08 AM. |