the following bash script is not working in fedora-11 Could anyone help me please?
#!/bin/bash
if
[$[`id -u`] -ne 0];then
echo " you are in root"
else echo " you must be in root -su mode??"
fi
exit
the following bash script is not working in fedora-11 Could anyone help me please?
#!/bin/bash
if
[$[`id -u`] -ne 0];then
echo " you are in root"
else echo " you must be in root -su mode??"
fi
exit
Replace:
if [$[`id -u`] -ne 0]
with:
if [ $(id -u) -ne 0 ]
Be aware of the spaces around the square brackets.
Thanks Franklin very much..........