Created
September 7, 2012 22:49
-
-
Save sc137/3670439 to your computer and use it in GitHub Desktop.
Bash script to first check that you are root ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$(id -u)" != 0 ]; then | |
echo "Please run this as root." | |
exit 1 | |
fi | |
echo "Success! You are root!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment