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

Next revision
Previous revision
haas:spring2018:unix:projects:upf1 [2017/03/05 23:31] – external edit 127.0.0.1haas:spring2018:unix:projects:upf1 [2018/03/17 12:59] (current) – [Process] wedge
Line 3: Line 3:
 <WRAP><fs 150%>CSCS1730 UNIX/Linux Fundamentals</fs></WRAP> <WRAP><fs 150%>CSCS1730 UNIX/Linux Fundamentals</fs></WRAP>
 </WRAP> </WRAP>
- 
-~~TOC~~ 
  
 ======Project: UNIX PIPE FUN (upf1)====== ======Project: UNIX PIPE FUN (upf1)======
Line 10: 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 46: Line 44:
   * unittools-20170201-09.tar.gz   * unittools-20170201-09.tar.gz
  
-You would select the "20170201-09" one, because the date it encodes (Feb 1st, 2017 at 9am) is the most recent in that group. You will find this to be a common practice with many software projects on the internet.+From visual inspection, you would select the "20170201-09" one, because the date it encodes (Feb 1st, 2017 at 9am) is the most recent in that group. You will find this to be a common practice with many software projects on the internet
 + 
 +Note, however, that visual inspection alone is not good enough for your steps file. New versions may be released, and your steps file needs to obtain the most recent version available. To facilitate this task, the latest and greatest version of unittools will be listed in a file called LATEST (which you should see near the top of the directory index listing). You can make use of this file to assist you in automating the process of determining and downloading the latest version of the unittools tools.
  
 Once those two steps are complete, you can begin on the tasks listed in your **TASK** file. Once those two steps are complete, you can begin on the tasks listed in your **TASK** file.
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 165: Line 175:
 <code> <code>
 78:upf1:final tally of results (78/78) 78:upf1:final tally of results (78/78)
-*:upf1:upf1steps submitted via submit tool [2/2+*:upf1:upf1steps has valid list of non-interactive instructions [4/4
-*:upf1:upf1steps covers steps from copy until submit [4/4] +*:upf1:upf1steps only copies/alters files if USER matches [4/4] 
-*:upf1:upf1steps squelches any STDERR output [4/4] +*:upf1:upf1steps builds the various task#.cli files it runs [4/4] 
-*:upf1:upf1steps only displays required STDOUT output [4/4] +*:upf1:upf1steps obtains the latest pipemath release from site [4/4] 
-*:upf1:task0.cli produces correct result [2/2] +*:upf1:upf1steps only displays specified STDOUT output [4/4
-*:upf1:task0.cli uses specified input_value [1/1+*:upf1:upf1steps resiliently creates local project directory [4/4
-*:upf1:task0.cli uses specified input_unit [1/1+*:upf1:upf1steps copies public dir data with absolute path [4/4
-*:upf1:task0.cli solution in specified output_unit [2/2+*:upf1:upf1steps makes clear, effective use of wildcards [4/4
-*:upf1:task0.cli solution using specified precision [1/1+*:upf1:upf1steps defines and uses custom variables [4/4
-*:upf1:task0.cli solution using specified delimiter [1/1] +*:upf1:upf1steps uses command expansions to get information [4/4
-*:upf1:task1.cli produces correct result [2/2] +*:upf1:upf1steps uses a loop to drive numbers in final output [4/4
-*:upf1:task1.cli uses specified input_value [1/1+*:upf1:upf1steps automates the task when run [4/4
-*:upf1:task1.cli uses specified input_unit [1/1+*:upf1:all files are organized, clear, and easy to read [4/4
-*:upf1:task1.cli solution in specified output_unit [2/2] +*:upf1:task#.cli files output using specified precision [3/3
-*:upf1:task1.cli solution using specified precision [1/1] +*:upf1:task#.cli files output using specified delimiter [3/3
-*:upf1:task1.cli solution using specified delimiter [1/1] +*:upf1:task#.cli files output only correct value and unit [4/4
-*:upf1:task2.cli produces correct result [2/2] +*:upf1:task#.cli files output in specified format [4/4
-*:upf1:task2.cli uses specified input_value [1/1] +*:upf1:task#.cli files display no STDERR output [4/4
-*:upf1:task2.cli uses specified input_unit [1/1] +*:upf1:task#.cli files have solution within given constraints [4/4
-*:upf1:task2.cli solution in specified output_unit [2/2+*:upf1:task#.cli files only contain the solution command-line [4/4]
-*:upf1:task2.cli solution using specified precision [1/1+
-*:upf1:task2.cli solution using specified delimiter [1/1+
-*:upf1:task3.cli produces correct result [2/2] +
-*:upf1:task3.cli uses specified input_value [1/1] +
-*:upf1:task3.cli uses specified input_unit [1/1] +
-*:upf1:task3.cli solution in specified output_unit [2/2] +
-*:upf1:task3.cli solution using specified precision [1/1+
-*:upf1:task3.cli solution using specified delimiter [1/1+
-*:upf1:task4.cli produces correct result [2/2+
-*:upf1:task4.cli uses specified input_value [1/1] +
-*:upf1:task4.cli uses specified input_unit [1/1] +
-*:upf1:task4.cli solution in specified output_unit [2/2+
-*:upf1:task4.cli solution using specified precision [1/1+
-*:upf1:task4.cli solution using specified delimiter [1/1+
-*:upf1:task5.cli produces correct result [2/2] +
-*:upf1:task5.cli uses specified input_value [1/1] +
-*:upf1:task5.cli uses specified input_unit [1/1] +
-*:upf1:task5.cli solution in specified output_unit [2/2] +
-*:upf1:task5.cli solution using specified precision [1/1] +
-*:upf1:task5.cli solution using specified delimiter [1/1] +
-*:upf1:task6.cli produces correct result [2/2] +
-*:upf1:task6.cli uses specified input_value [1/1] +
-*:upf1:task6.cli uses specified input_unit [1/1] +
-*:upf1:task6.cli solution in specified output_unit [2/2] +
-*:upf1:task6.cli solution using specified precision [1/1] +
-*:upf1:task6.cli solution using specified delimiter [1/1] +
-*:upf1:task7.cli produces correct result [2/2] +
-*:upf1:task7.cli uses specified input_value [1/1] +
-*:upf1:task7.cli uses specified input_unit [1/1] +
-*:upf1:task7.cli solution in specified output_unit [2/2] +
-*:upf1:task7.cli solution using specified precision [1/1] +
-*:upf1:task7.cli solution using specified delimiter [1/1]+
 </code> </code>
 +
 +Additionally:
 +  * 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 will be subject to a 25% overall deduction
haas/spring2018/unix/projects/upf1.1488756682.txt.gz · Last modified: 2017/03/05 23:31 by 127.0.0.1