The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 314 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
This is run in Red Hat Linux 6.1 using bash
Â
1.    Run the following script:
Â
a. #!/bin/bash
b. count=1
c. echo "start of the program"
d. while [ $count -le 10 ]
e. do
Â
1)Â echo "Loop #$count"
2)Â sleep 10
3)Â count=$[ count + 1 ]
Â
f. done
g. echo "end of the program
Â
1.    Modify the program to add a trap for SIGINT and SIGTERM.
2.    Save the script and then run the script in the background.
3.    Use the jobs command to display a list of the jobs currently running.
4.    Find the process id of the script and kill the job.
5.    Check to see if you get the trap message.
6.    Run the script again using the at command to schedule the job in the future. Wait for the job to run to make sure it executes.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly