Skip to content

Instantly share code, notes, and snippets.

View wongjiahau's full-sized avatar

WJH wongjiahau

  • Malaysia
View GitHub Profile
@wongjiahau
wongjiahau / script.sh
Created August 12, 2017 05:06 — forked from thimbl/script.sh
shell script to create user accounts
#!/bin/bash
ROOT_UID=0
SUCCESS=0
E_USEREXISTS=70
# Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway)
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root to run this script."
exit $E_NOTROOT
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug