Programming Solution

You have completed the code for the automation of the required tasks; the final step is to submit the script to the team for use. After you have incorporated any appropriate feedback into your project, one last requirement needs to be addressed.

Add to your Perl script the ability to kill a user’s processes (from shell script 3). The requirements for this task include the following:

Add this option to the menu.

Add the code/process into a subroutine.

Use an array to store the list of processes that need to be reviewed and killed.

Process the kill using the array.

Next, you have been asked by different users to explain how to compile a program in a UNIX environment.

Finally, take the following C program (save it as “power2.c”), and create it as a file in your UNIX environment:

/* power2.c — Print out powers of 2: 1, 2, 4, 8, .. up to 2^N */

#include <stdio.h>

#define N 16

int main(void) {

int n; /* The current exponent */

int val = 1; /* The current power of 2 */

printf(“/t n /t 2^n/n”);

printf(“/t================/n”);

for (n=0; n<=N; n++) {

printf(“/t%3d /t %6d/n”, n, val);

val = 2*val;

}

return 0;

}

/* It prints out :

n 2^n

(College of Science and Technology, n.d.)

Describe the behavior when you compile the program, with no options. What is the command that you would use to compile the code and create the executable “power2”?

Finally, compare and contrast the usage of a compiled and interpreted program.

Add the final Perl program along with the discussions about compiling a program and compiled versus interpreted to the section in your template “UNIX Tools.”

Update the TOC to reflect the new section.

Name the document yourname_CS345__Final.doc.

Submit your database file to the Submission area.

College of Science and Technology. (n.d.). Retrieved from http://www.cis.temple.edu/~ingargio/cis71/code/power2.c

Applied Sciences

Review and reflect on the knowledge you have gained from this course. Based on your review and reflection, write at least 3 paragraphs on the following:

What were the most compelling topics learned in this course?

How did participating in discussions help your understanding of the subject matter? Is anything still unclear that could be clarified?

What approaches could have yielded additional valuable information?

Responses to Other Students: Respond to at least 2 of your fellow classmates with a reply of at least 100 words about their primary task response regarding items you found to be compelling and enlightening. To help you with your discussion, please consider the following questions:

What did you learn from your classmate’s posting?

What additional questions do you have after reading the posting?

What clarification do you need regarding the posting?

What differences or similarities do you see between your posting and other classmates’ postings?

Get a 10 % discount on an order above $ 100
Use the following coupon code :
ULTIMATE