University of Phoenix Material Systems Administration Scripting Log To: From: Date: 11/28/2011 As you complete each step listed below, sustenance track of what occurs at each point: what you type and the issue given, as come up as if you experience whatsoever errors. Submit this information in a pound to your instructor for this weeks assignment. Your log can use the experiment format provided, or defecate your own. 1. In the same brochure as last week, pee a newly read called week4prog1[name].scr. Cd Desktop/week4 vi week4prog1.scr 2. Change the permissions on this new file to put up the live up to bit for user, group, and owner. Chmod ug+x week4prog1.scr 3. Run the record below: a. #!/ store/bash b. depend=1 c. riposte run short of the syllabus d. while [ $ repair -le 10 ] e. do i. recapitulate Loop #$ numberi ng ii. calmness 10 iii. add up=$[ opine + 1 ] f. through with(p) g. echo end of the syllabus results, 4. Modify the program to add a pickle for SIGINT and SIGTERM. #!/bin/bash fix interrupt_handler SIGINT ambush terminate_handler SIGTERM interrupt_handler(){ echo Program Interrupted. exit } terminate_handler(){ echo Program terminated.
exit } count=1 echo start of the program w hile [ $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. accomplish the book and this time run the script in the background. ./week4prog1.scr & ( runs program in background 6. Use the jobs command to display 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.