Difference between revisions of "Scripting Compatibility for Current OPS235 labs: (Week-by-week)"

From CDOT Wiki
Jump to: navigation, search
Line 11: Line 11:
 
== Lab 2:==
 
== Lab 2:==
  
::'''Scripting for Lab2'''. Lab 2 could be modified to have students create or be exposed to shell scripts with use the '''virtual shell''' ('''virsh''') to '''display in zenity available VMS in checkbox form to select and launch'''. Likewise, script can be launched to '''display in zenity VMs that are currently running in order to shutdown''' (perhaps in same fashion as a zenity dialog box)<br><br>OPS435 Elements:<blockquote><ul><li>'''x'''</li><li>'''x'''</li><li>'''IO Stream vs Graphical Interaction''' (eg. zenity)</li><li>'''Scripting Samples (View and adapt)'''- don't "re-invent the wheel completely")</li><li>x</li></ul></blockquote><br><br>Example of Shell script Demo 1: [ [[lab2 Shell Script Demo 1]] ]<br>>Example of Shell script Demo 2: [ [[lab2 Shell Script Demo 2]] ]<br><br>Listing of Scripting Skills from Demo Listed Above:<blockquote><ul><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li></ul></blockquote><br><br>Connection with ULI101 Scripting Skills (Course Outline):<br>Connection with OPS435 Scripting Skills (Course Outline):<br><br>
+
::'''Scripting for Lab2'''. Lab 2 could be modified to have students create or be exposed to shell scripts with use the '''virtual shell''' ('''virsh''') to '''display in zenity available VMS in checkbox form to select and launch'''. Likewise, script can be launched to '''display in zenity VMs that are currently running in order to shutdown''' (perhaps in same fashion as a zenity dialog box)<br><br>OPS435 Elements:<blockquote><ul><li>'''x'''</li><li>'''x'''</li><li>'''IO Stream vs Graphical Interaction''' (eg. zenity)</li><li>'''Scripting Samples (View and adapt)'''- don't "re-invent the wheel completely")</li><li>x</li></ul></blockquote><br><br>Example of Shell script Demo 1: [ [[lab2 Shell Script Demo 1]] ]<br>Example of Shell script Demo 2: [ [[lab2 Shell Script Demo 2]] ]<br><br>Listing of Scripting Skills from Demo Listed Above:<blockquote><ul><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li></ul></blockquote><br><br>Connection with ULI101 Scripting Skills (Course Outline):<br>Connection with OPS435 Scripting Skills (Course Outline):<br><br>
  
 
== Lab 3:==
 
== Lab 3:==

Revision as of 11:23, 17 January 2015

Purpose of this Resource:

To match compatibility of scripting elements for current OPS235 labs. Emphasis will be placed on practicality, creativity, and listing scripting items that can be used to match and compare towards existing scripting course OPS435 to provide information for CNS / CTY curriculum discussions. This resource will concentrate initially with short-term "fits" (i.e. no major structural changes to course from existing learning outcomes, topics and core skills.


Lab 1:

When executed as root or using sudo command, prompts for elements to include in report
Notifies completion of report and file pathname of report
Scripting for Lab1. Lab 1 could be modified to have students generate a report regarding the collection of Linux information after an install. Certainly command substitution could be taught and to reinforce redirection >> to add content to a filename (i.e. not over-ride). It would be interesting to expose students to the zenity command to allow a menu to give user choice of report elements to include in the generated report. Perhaps a link to a "fancy" Bash shell script to generate a web-page so students can view the contents in a nice format. This scripting element could easily be added to assignment #1.

OPS435 Elements:
  • command substitution (shell grammar?)
  • redirection (> vs >>)>
  • IO Stream vs Graphical Interaction (eg. zenity)
  • Scripting Samples (View and adapt- don't "re-invent the wheel completely")
  • Exposure to for loop with positional parameters (storing checkbox selections) for report


Example of Shell script Demo: [ lab1 Shell Script Demo ]

Listing of Scripting Skills from Demo Listed Above:
  • if statement
  • exit command
  • USER Environment Variable
  • redirection (both > and >>)
  • zenity
  • for loop
  • command substitution
  • sed
  • set command (positional parameters)


Connection with ULI101 Scripting Skills (Course Outline):
Connection with OPS435 Scripting Skills (Course Outline):

Practical Consideration for scripting in lab1: Do students create simple bash shell script, add elements, then have them copy and paste, then run this more complex script? Key elements of scripting elements should be contained in information boxes in lab. Should midterm and/or final exam contain a scripting question? (recommended)

Lab 2:

Scripting for Lab2. Lab 2 could be modified to have students create or be exposed to shell scripts with use the virtual shell (virsh) to display in zenity available VMS in checkbox form to select and launch. Likewise, script can be launched to display in zenity VMs that are currently running in order to shutdown (perhaps in same fashion as a zenity dialog box)

OPS435 Elements:
  • x
  • x
  • IO Stream vs Graphical Interaction (eg. zenity)
  • Scripting Samples (View and adapt)- don't "re-invent the wheel completely")
  • x


Example of Shell script Demo 1: [ lab2 Shell Script Demo 1 ]
Example of Shell script Demo 2: [ lab2 Shell Script Demo 2 ]

Listing of Scripting Skills from Demo Listed Above:
  • x
  • x
  • x
  • x
  • x
  • x
  • x
  • x
  • x


Connection with ULI101 Scripting Skills (Course Outline):
Connection with OPS435 Scripting Skills (Course Outline):

Lab 3:

Lab 4:

Lab 5:

Lab 6:

Lab 7:

Lab 8:

Assignment 1:

Perhaps add element to existing assignment to develop an asset inventory for installed Linux system. Perhaps use html template to create nice-looking report based on required content.

Assignment 2:

Quizzes:

Additional Comments

Additional Resources