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

From CDOT Wiki
Jump to: navigation, search
Line 6: Line 6:
 
== Lab 1:==
 
== Lab 1:==
  
::#'''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.<br><br>OPS435 Elements:<ul><li>'''command substitution''' (shell grammar?)</li><li>'''redirection''' (&gt; vs &gt;&gt;)></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>Exposure to '''for''' loop with '''positional parameters''' (storing checkbox selections) for report</ul><br><br>Example of Shell script Demo: [[lab1 Shell Script Demo]]<br><br>Listing of Scripting Skills from Demo Listed Above:<ul><li>if statement</li><li>exit command</li><li>redirection (both &gt; and &gt;&gt;)</li><li>zenity</li><li>for loop</li><li>command substitution</li><li>sed</li><li>set command (positional parameters)</li></ul><br><br>
+
::#'''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.<br><br>OPS435 Elements:<ul><li>'''command substitution''' (shell grammar?)</li><li>'''redirection''' (&gt; vs &gt;&gt;)></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>Exposure to '''for''' loop with '''positional parameters''' (storing checkbox selections) for report</ul><br><br>Example of Shell script Demo: [[lab1 Shell Script Demo]]<br><br>Listing of Scripting Skills from Demo Listed Above:<ul><li>'''if''' statement</li><li>'''exit''' command</li><li>'''redirection''' (both &gt; and &gt;&gt;)</li><li>'''zenity'''</li><li>'''for''' loop</li><li>'''command substitution'''</li><li>'''sed'''</li><li>'''set''' command ('''positional parameters''')</li></ul><br><br>
  
 
== Lab 2:==
 
== Lab 2:==

Revision as of 02:28, 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:

  1. 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
    • redirection (both > and >>)
    • zenity
    • for loop
    • command substitution
    • sed
    • set command (positional parameters)


Lab 2:

Lab 3:

Lab 4:

Lab 5:

Lab 6:

Lab 7:

Lab 8:

Assignment 1:

  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