This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2017:unix:projects:upf0 [2017/02/25 21:03] – [Get started] wedge | haas:spring2017:unix:projects:upf0 [2017/02/27 18:27] (current) – [upf0steps] wedge | ||
---|---|---|---|
Line 23: | Line 23: | ||
This week's project has 2 points of origin. | This week's project has 2 points of origin. | ||
- | First, in the **upf0/** sub-directory of the UNIX Public Directory, | + | First, in the **upf0/** sub-directory of the UNIX Public Directory, |
- | * **TASK** | ||
* **numbers.tgz** | * **numbers.tgz** | ||
- | Copy these into your project directory. | + | Then, under a directory by the name of your username within that same directory, there will be another file: |
+ | |||
+ | * **TASK** | ||
+ | |||
+ | Copy both of these files into your project directory. | ||
The **TASK** file will contain the particular command-line equations you have to perform, along with their stated constraints. | The **TASK** file will contain the particular command-line equations you have to perform, along with their stated constraints. | ||
- | The **numbers.tgz** file needs to be extracted, compiled, and installed; there are README | + | The **numbers.tgz** file needs to be extracted, compiled, and installed; there is a README |
Next, you will want to grab the latest version of the **pipemath** suite from the following URL: | Next, you will want to grab the latest version of the **pipemath** suite from the following URL: | ||
Line 38: | Line 41: | ||
* https:// | * https:// | ||
- | You will want to use a tool like **wget(1)** or **curl(1)** to non-interactively download it onto your lab46 account, and similarly extract, compile, and install that (check its own README/INSTALL files). | + | You will want to use a tool like **wget(1)** or **curl(1)** to non-interactively download it onto your lab46 account, and similarly extract, compile, and install that (check its own README |
There may be multiple versions of **pipemath** available at the download link. Unless you have specific reason otherwise (for this project, you do not), you want to go for the latest version, which will be reflected by the most recent datestamp encoded in the file's name. | There may be multiple versions of **pipemath** available at the download link. Unless you have specific reason otherwise (for this project, you do not), you want to go for the latest version, which will be reflected by the most recent datestamp encoded in the file's name. | ||
Line 61: | Line 64: | ||
====pipemath suite==== | ====pipemath suite==== | ||
- | The pipemath suite is a collection of command-line tools that perform various basic math operations you may fine useful for this project. The tools include: | + | The pipemath suite is a collection of command-line tools that perform various basic math operations you may find useful for this project. The tools include: |
* **plus** - addition | * **plus** - addition | ||
Line 82: | Line 85: | ||
In the **TASK** file, you will be given a set of tasks you need to construct command-lines for to solve, using the tools provided to you in both the **numbers** and **pipemath** suites. You will also want to make use of pipes and command expansions in your solutions. | In the **TASK** file, you will be given a set of tasks you need to construct command-lines for to solve, using the tools provided to you in both the **numbers** and **pipemath** suites. You will also want to make use of pipes and command expansions in your solutions. | ||
- | There will also be both number, operation, minimum pipes, and maximum pipes constraints listed for each problem, which you will need to abide by in order to receive full credit. | + | There will also be result, numbers, operations, minimum pipes, and maximum pipes constraints listed for each problem, which you will need to abide by in order to receive full credit. |
+ | |||
+ | The potential constraints are as follows: | ||
+ | |||
+ | | ||
+ | * **ONLY: | ||
+ | * **WITH_LIMITS: | ||
+ | * **EXCEPT:** you are explicitly not allowed | ||
+ | |||
+ | There may also be quantity limits on how many times you can use each number or operation. If so, such will be shown in parenthesis following the item in question. | ||
- | There may be quantity limits on how many times you can use each number or operation. If so, such will be shown in parenthesis following the item in question. | + | Also, no cheating with idle " |
As an example, take the following (formatted is it would appear in your **TASK** file): | As an example, take the following (formatted is it would appear in your **TASK** file): | ||
Line 91: | Line 103: | ||
task: 0 | task: 0 | ||
result: 4 | result: 4 | ||
- | numbers: three(2), five, seven, nine | + | numbers: |
- | operations: | + | operations: |
min_pipes: 2 | min_pipes: 2 | ||
- | max_pipes: | + | max_pipes: |
</ | </ | ||
Line 148: | Line 160: | ||
* note that the task#.cli output appears on the SAME line as the "Task X result is:" 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 result is:" text, and there is a single space separating it from the colon. | ||
- | For example, a sample output of your **upf0steps** script should appear like follows (but your # values will of course be different based on your individual **TASKS** file): | + | For example, a sample output of your **upf0steps** script should appear like follows (but your # values will of course be different based on your individual **TASK** file): |
<cli> | <cli> | ||
Line 155: | Line 167: | ||
Task 1 result is: 27 | Task 1 result is: 27 | ||
Task 2 result is: 32 | Task 2 result is: 32 | ||
+ | Task 3 result is: 7 | ||
Task 4 result is: -4 | Task 4 result is: -4 | ||
Task 5 result is: 57 | Task 5 result is: 57 | ||
Line 179: | Line 192: | ||
</ | </ | ||
- | You should get some sort of confirmation indicating successful submission | + | You should get some sort of confirmation indicating successful submission |
I'll be looking for the following: | I'll be looking for the following: | ||
Line 191: | Line 204: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
*: | *: | ||
</ | </ |