University of Phoenix Material Systems Administration Scripting Log To: From: Date: 11/28/2011 As you complete each step listed below, concord track of what occurs at each point: what you type and the siding given, as come up as if you experience both errors. Submit this information in a pound to your teacher for this weeks assignment. Your log can use the assay format provided, or defecate your own. 1. In the same pamphlet as last week, pee a unsanded charge up called week4prog1[name].scr. Cd Desktop/week4 vi week4prog1.scr 2. Change the permissions on this new file to work the live up to bit for user, group, and owner. Chmod ug+x week4prog1.scr 3. Run the record below: a. #!/ store/bash b. nil=1 c. band jumpstart of the syllabus d. while [ $ mulct -le 10 ] e. do i. environ Loop #$ numbering ii. quietus 10 iii. add up=$[ press + 1 ] f. do g. echo end of the design results, 4. Modify the program to add a pickle for SIGINT and SIGTERM. #!/bin/bash maw interrupt_handler SIGINT bound terminate_handler SIGTERM interrupt_handler(){ echo Program Interrupted. exit } terminate_handler(){ echo Program terminated. exit } count=1 echo start of the program while [ $count -le 10 ] do echo Loop #$count sleep 10 count=$[ count + 1 ] done echo end of the program Results of interrupt, Results of terminate, 5. save up the hired man and this time run the script in the background. ./week4prog1.scr & ( runs program in background 6. Use the jobs command to di splay a list of the jobs currently running.! Jobs l 7. Find the process id of the script and kill the job. Kill -15 8. chip to see if you get the trap message....If you want to get a full essay, order it on our website: BestEssayCheap.com
If you want to get a full essay, visit our page: cheap essay
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.