|
How to kill a script ?
Hi all,
I know that i cant ask questions from my assignment. But i am stuck at one point. Following is my assignment question.
Write a shell script which will count down (i.e. display) from 10 to 1, display "bang", and repeat endlessly.
There will be a 1 second delay between the display of each count.
The script is to be run in the background.
I have made the script and its working fine. But the main problem is that i dont know how to kill that script. My professor needs a demonstration from me and wants to see how i am killing the script. Ctrl^z and Ctrl^c are not working.
Here is my script:
#!/bin/bash
while (j=1)
do
for (( i=10; i>0; i--));
do
sleep 1 &
j=1
printf " $i \n"
wait
done
done
Could you please help me in this ??
|