I need the unix shell equivalent to the "perl" die command
e.g. die "you must be root user to run this so goodbye"
I would expect this to work but it doesnt
Is there a way to group the 2 commands as a block without making an actual "if" block?
e.g. die "you must be root user to run this so goodbye"
I would expect this to work but it doesnt
Code:
[ "$UID" = "0" ] || (echo your not root so goodbye; exit -1 )
echo if you see this then you must be root
Is there a way to group the 2 commands as a block without making an actual "if" block?