Skip to content

Instantly share code, notes, and snippets.

@peteroid
Last active March 21, 2017 10:58
Show Gist options
  • Save peteroid/9d2b2612142aecc72c72fcb85a182cd4 to your computer and use it in GitHub Desktop.
Save peteroid/9d2b2612142aecc72c72fcb85a182cd4 to your computer and use it in GitHub Desktop.
Self standard for Shell
# based on POSIX
# POSIX in a nutshell: http://stackoverflow.com/questions/1780599/i-never-really-understood-what-is-posix
# $(cmd) > `cmd`
# ref: http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03
# check root
if [[ $EUID -ne 0 ]]; then
echo "Please grant permission!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment