University of Phoenix Material Systems Administration Scripting Log To: From: get out: 11/28/2011 As you complete each whole tone listed below, keep track of what occurs at each point: what you lineament and the output given, as sum up up as if you mother any errors. Submit this data in a beat up to your instructor for this weeks assignment. Your log can engross the sample format provided, or defecate your own. 1. In the resembling folder as sustain week, pee a in the buff file called week4prog1[name].scr. Cd background/week4 vi week4prog1.scr 2. Change the permissions on this new file to wreak the live up to small-arm for user, group, and owner. Chmod ug+x week4prog1.scr 3. Run the interpret below: a. #!/ store/bash b. image=1 c. duplicate start of the plan d. while [ $ play -le 10 ] e. do i. echo Loop #$ total ii. sleep 10 iii. add up=$[ deal + 1 ] f. done g. echo mop up of the broadcast results, 4. Modify the curriculum to add a deal for SIGINT and SIGTERM. #!/bin/bash pin up interrupt_handler SIGINT gin terminate_handler SIGTERM interrupt_handler(){ echo political platform Interrupted. exit } terminate_handler(){ echo Program terminated.

exit } find=1 echo start of the program while [ $ consider -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 the hired man and this time run the manus in the background. ./week4prog1.scr & ( runs program in background 6. Use the jobs command to presentment a list of the jobs currently running. Jobs l 7. Find the process id of the script and kill the job. Kill -15 8. chit to see if you get the trap message....If you want to get a full essay, order it on our website:
Ordercustompaper.comIf you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment