CSCS1730 UNIX/Linux Fundamentals

PROJECT: GRADE TO FIGURE OUT (gtf0)

OBJECTIVE

Throughout the semester, you have been, through the use of the text-based sc spreadsheet, computing your current grade in the class based on snap shots of data at the 4-, 8-, and 12- week intervals.

Your aim with this project is to take your familiarity with manually performing that process, and automate it through the use of a shell script.

TASK

Take one of your existing gfoX assignments and look at the spreadsheet file created. Not through sc itself, but instead, in a text editor (such as vi/vim).

Take in the structure of the information, the format. The patterns of how the data progresses.

Can you predict how things will progress and work? Can you automate those steps?

Your aim is to create a bash shell script that will perform the work of reading from the status command output (be sure to be familiar with grep(1)), and have it construct a spreadsheet (in accordance with gfoX submission criteria) of your progress in the class, based on the particular gfoX instance (or week number given).

You will want to make use of:

  • variables
  • command-line argument (via $1, etc.)
  • if statements / the test command (via [)
  • loops
  • I/O redirection
  • command expansion
  • regular expressions

Again, the sc-compatible spreadsheet your script produces should be viewable in sc, and be in accordance with gfoX submission criteria (the idea is that you will be able to use it to submit gfo2 when its time comes).

SUBMISSION

To be successful in this project, the following criteria (or their equivalent) must be met:

  • Project must be submit on time, by the deadline.
    • Late submissions will lose 33% credit per day, with the submission window closing on the 3rd day following the deadline.
  • Executed programs must display in a manner similar to provided output
    • output formatted, where applicable, must match that of project requirements
  • Processing must be correct based on input given and output requested
  • Output, if applicable, must be correct based on values input
  • Code must be nicely and consistently indented
  • Code must be consistently written, to strive for readability from having a consistent style throughout
  • Code must be commented
    • Any "to be implemented" comments MUST be removed
      • these "to be implemented" comments, if still present at evaluation time, will result in points being deducted.
      • Sufficient comments explaining the point of provided logic MUST be present
  • No global variables (without instructor approval), no goto statements, no calling of main()!
  • Track/version the source code in your private semester repository
  • Submit a copy of your source code to me using the submit tool by the deadline.

SUBMIT TOOL USAGE

Let's say you have completed work on the project, and are ready to submit, you would do the following:

lab46:~/src/SEMESTER/unix/gtf0$ submit unix gtf0 gtf0.sh

You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.

RUBRIC

I'll be evaluating the project based on the following criteria:

286:gtf0:final tally of results (286/286)
*:gtf0:script operates with no warnings or errors [26/26]
*:gtf0:script produces sc compatible spreadsheet [26/26]
*:gtf0:spreadsheet produce is conformant with gfoX submission criteria [26/26]
*:gtf0:spreadsheet calculations are accurate based on week range [26/26]
*:gtf0:script accepts and uses either a gfoX assignment or week number [26/26]
*:gtf0:script uses variables, commandline args, if statements, and loops [52/52]
*:gtf0:script uses regex, IO redirection, command expansion [52/52]
*:gtf0:committed script to private semester repo [52/52]

Additionally:

  • Solutions not abiding by spirit of project will be subject to a 50% overall deduction
  • Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction
  • Solutions not utilizing indentation to promote scope and clarity or otherwise maintaining consistency in code style and presentation will be subject to a 25% overall deduction
  • Solutions not organized and easy to read (assume a terminal at least 90 characters wide, 40 characters tall) are subject to a 25% overall deduction