User Tools

Site Tools


haas:spring2018:unix:projects:upf1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2018:unix:projects:upf1 [2018/03/05 17:16] – [Submission] wedgehaas:spring2018:unix:projects:upf1 [2018/03/17 12:59] (current) – [Process] wedge
Line 8: Line 8:
 =====Errata===== =====Errata=====
  
-  * any bugfixes or project updates will be posted here+  * revision: unittools now all list **-I** argument (input delimiter) on help; **hm2Dm** link should also connect correctly (20180308)
  
 =====Objective===== =====Objective=====
Line 60: Line 60:
   * **ft2yd** - convert feet to yards   * **ft2yd** - convert feet to yards
   * **hm2dm** - convert hectometers to decimeters   * **hm2dm** - convert hectometers to decimeters
-  * **hm2Dm** - convert hectometers to Decameters+  * **hm2Dm** - convert hectometers to Decameters (if not available, use **hm2dcm** instead)
   * **in2cu** - convert inches to cubits   * **in2cu** - convert inches to cubits
   * **in2ft** - convert inches to feet   * **in2ft** - convert inches to feet
Line 73: Line 73:
 The tools by default expect input via STDIN, and will output to STDOUT. The tools by default expect input via STDIN, and will output to STDOUT.
  
-These tools have command-line arguments which can alter their default behavior. You may want to review the options and defaults.+These tools have command-line arguments which can alter their default behavior. You may want to review the options and defaults (try running them with the **-h** argument to see what sort of functionality is available).
  
 =====Process===== =====Process=====
Line 98: Line 98:
 lab46:~/src/unix/upf1$ echo "13.78" | in2ft lab46:~/src/unix/upf1$ echo "13.78" | in2ft
 1.15 ft 1.15 ft
 +lab46:~/src/unix/upf1$ 
 +</cli>
 +
 +But that's not very optimized. We could instead do something better, like:
 +
 +<cli>
 +lab46:~/src/unix/upf1$ echo "35.000 cm" | cm2in OPTIONS | in2ft OPTIONS
 +35.000 cm >> 13.780 in >> 1.148 ft
 lab46:~/src/unix/upf1$  lab46:~/src/unix/upf1$ 
 </cli> </cli>
Line 113: Line 121:
 </cli> </cli>
  
-Basically, each task#.cli can be its own script. If we were to execute it, the correct result should be produced.+Basically, each task#.cli will be its own script. If we were to execute it, the correct result should be produced.
  
 =====upf1steps===== =====upf1steps=====
-You will once again be creating a steps file that can automate your project. +You will once again be creating a steps file that can automate your project (ie it contains a list of non-interactive steps to complete the task)
  
 As in previous projects, **upf1steps** will contain the steps you took from the point of copying the numbers suite and downloading the unittools suite up until the submit step (hint: just run the task#.cli scripts within the steps script). As in previous projects, **upf1steps** will contain the steps you took from the point of copying the numbers suite and downloading the unittools suite up until the submit step (hint: just run the task#.cli scripts within the steps script).
Line 125: Line 133:
   * your script should not produce ANY STDERR output   * your script should not produce ANY STDERR output
   * your script should ONLY produce STDOUT output in conformance with the below stated requirements. Any other output needs to be silenced.   * your script should ONLY produce STDOUT output in conformance with the below stated requirements. Any other output needs to be silenced.
 +  * You will want one unified command-line producing the end result, not separate one-step transitions. The idea is to utilize pipes.
 +    * semi-colons used to separate commands do not constitute one command-line, but several.
   * For each task, you'll want to display things as follows:   * For each task, you'll want to display things as follows:
     * "Task X conversion chain: CHAIN"     * "Task X conversion chain: CHAIN"
Line 130: Line 140:
       * where CHAIN is the conversion chain output matching the TASK file result requested (ie, you must run your task#.cli script to produce this output).       * where CHAIN is the conversion chain output matching the TASK file result requested (ie, you must run your task#.cli script to produce this output).
         * note that the task#.cli output appears on the SAME line as the "Task X conversion chain:" text, and there is a single space separating it from the colon.         * note that the task#.cli output appears on the SAME line as the "Task X conversion chain:" text, and there is a single space separating it from the colon.
-        * note there is no space between value and unit+        * there is NO space between value and unit
  
 For example, a sample output of your **upf1steps** script should appear like follows (but your # values will of course be different based on your individual **TASK** file): For example, a sample output of your **upf1steps** script should appear like follows (but your # values will of course be different based on your individual **TASK** file):
Line 181: Line 191:
 *:upf1:task#.cli files output using specified delimiter [3/3] *:upf1:task#.cli files output using specified delimiter [3/3]
 *:upf1:task#.cli files output only correct value and unit [4/4] *:upf1:task#.cli files output only correct value and unit [4/4]
-*:upf1:task#.cli files use specified number tools by quantity [4/4]+*:upf1:task#.cli files output in specified format [4/4]
 *:upf1:task#.cli files display no STDERR output [4/4] *:upf1:task#.cli files display no STDERR output [4/4]
 *:upf1:task#.cli files have solution within given constraints [4/4] *:upf1:task#.cli files have solution within given constraints [4/4]
-*:upf1:task#.cli files only have the solution command-line [4/4]+*:upf1:task#.cli files only contain the solution command-line [4/4]
 </code> </code>
  
haas/spring2018/unix/projects/upf1.1520270212.txt.gz · Last modified: 2018/03/05 17:16 by wedge