Test for root.

Páxina inicial
Anexos:
Mensaxe orixinal
+ (text/plain)
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Carl Parrish
Data:  
Asunto: Test for root.
Okay I'm writting a script that tests for root status. like so

|

test `whoami` = 'root' || echo "You must be root to execute the commands."

it never seems to be able to pass the test. From the command line I can run whoami and get back root but it never works in the script.
Any idea what I'm doing wrong?

Carl P.

|