Why does the following script display an "unexpected operator" message and fail when run with SH, but not with BASH.
!/bin/sh
if [ $UID -ne 0 ]
then
echo "You must be root."
exit 1
else
echo "Open sesame."
exit 0
fi
|
Why does the following script display an "unexpected operator" message and fail when run with SH, but not with BASH.
|
|||
|
|
|
Not all shells define a variable A portable way to obtain the user ID is with the
|
|||