Posted By

haureal on 12/29/10


Tagged

root


Versions (?)

How to check the superuser privileges


 / Published in: Bash
 

  1. if [ $UID -ne 0 ]; then
  2. echo "Superuser privileges are required to run this script."
  3. echo "e.g. \"sudo $0\""
  4. exit 1
  5. fi

Report this snippet  

You need to login to post a comment.