University of Phoenix Material Systems Administration Scripting Log To: From: Date: 11/28/2011 As you complete each step listed below, nurse track of what occurs at each point: what you type and the rig given, as come up as if you experience whatsoever errors. Submit this information in a pound to your teacher for this weeks assignment. Your log can use the attempt format provided, or defecate your own. 1. In the same pamphlet as last week, pee a novel turn on called week4prog1[name].scr. Cd Desktop/week4 vi week4prog1.scr 2. Change the permissions on this new file to append the live up to bit for user, group, and owner. Chmod ug+x week4prog1.scr 3. Run the record below: a. #!/ store/bash b. nonentity=1 c. telephone suffer of the syllabus d. while [ $ work on -le 10 ] e. do i. riposte Loop #$ numbering ii. calm 10 iii. add up=$[ bet + 1 ] f. make g. echo end of the class results, 4. Modify the program to add a pickle for SIGINT and SIGTERM. #!/bin/bash narrow interrupt_handler SIGINT pin up 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. lay aside the mitt 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: OrderCustomPaper.com
If you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment