Changes

Jump to: navigation, search

OPS245 Lab 1

5 bytes removed, 18:29, 24 August 2021
m
INVESTIGATION 4: Using Python Scripting to Generate System Information Reports
= INVESTIGATION 4: Using Python Scripting to Generate System Information Reports =
Before we can successfully automate parts of configuration using python, we need to learn how to use it. Initially we will duplicate perform simple tasks we have already learned how to do in bash. This way can learn how the language works as we go.
In this investigation you will write a python script that duplicates (as closely as possible with the parts of python we have covered so far) the bash script from file we created in the previous investigation.
:'''Perform the Following Steps:'''
<li>Since we haven't covered if statements in python yet, we won't be able to check if the user running the script is root. For now, we will have to trust ourselves to remember to use elevated permissions to run this script. We will correct this in lab 2.</li>
</ul></li>
<li>Populate the beginning of the file with sh-bang line and block comment equivalent to describing what was in '''myreport.bash'''this script does:
<br>
<pre style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;>
</ul>
</li>
<li>Run your script to make sure it works. Note that the output does not need to match the bash script investigation 3 exactly, but it should be very close.</li>
</ol>
932
edits

Navigation menu