Open main menu

CDOT Wiki β

Changes

OPS245 Scripting Exercises Lab 2 dev

29 bytes added, 10:05, 26 January 2023
Conditional Logic
Now let's try doing the same thing in Python. Here's a sample if statement in Python.
<pre>
thor# Author: Jason Carman# Date: January 26, 2023
# Purpose: Check to see if the user is root, if they are not inform them they should run the script as root and exit with an error (non-zero) status code
# Usage: ./checkuser.py