Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You're just sending the sleep into the the background... Think about the requirement more closely.
@OP you need to pay attention to what chrism01 is telling you. They are correct, you have a "no wait" loop running a do-forever operation, basically, within your for 1-10 loop. I'm betting this makes CTRL-C hard, and I'm also wondering, sans personal experimentation whether or not you have a zillion (give or take) children being spawned with those background sleeps from within your do-forever loop. Why not look at the process list when you run it.
if you are going to be running it in the background off of the command line, which it looks like you already know how to do in post #5.
As you stated this, "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."
the word "demonstration" clearly indicates he just wants to see you preform the task. this is a no brainier if you stop and think about it enough , and requires no coding whatsoever.
it is all command line driven using two terminals and knowing how to use the kill, pkill, or killall command.
All you're really missing is that part where you display "bang", within your code and you are done.
EXCEPT
the next posted question points out something very important too. It is termed overkill, and what are you waiting for seeings how you're already sleeping? Talk about overkill. Figure out that little riddle.
where only one letter in the alphabet is really needed, where then is a true statement needed? another riddle for you.
now go back up and read what @chrism01 had to say and think about it some more, until you get it, then hopefully you'll act on it properly. knowing what the term overkill means too would be important.
Then hopefully you'll get an A+ on this assignment.
(this post has been modified in accordance with some by-law that not even I am aware of)
well if he has not figured it out by now then what is to be said of that?
or
I am really getting tired of people pulling old post and reviving them. I don't even get that board.
well if he has not figured it out by now then what is to be said of that?
or
I am really getting tired of people pulling old post and reviving them. I don't even get that board.
I've bookmarked this post of yours so that I can revive it in 2023.
Me too, but to be fair, I reckon a number of folk who've done that find the threads through Google etc. and don't notice the dates on the thread when they add a post to it.
can I just point out that the qn & my prev responses are from 2010 ...
OK sorry, but ... well LQ does warn us about resurrecting very old threads. So whomever raised the thread up after many years, apparently ignored the warning which comes up before you post. The rest of us are guilty of not noticing that too, but we obviously do not receive warnings by the site once the thread was raised up.
In Ubuntu 14.04 LTS, you should be able to do CTRL + ALT + DEL, just like a windows. If you cannot do that, just search "System Monitor" in the start menu. Just look for the process "bash" in the system monitor window, and kill it using the "End process" button. If you can SEE the window and it is frozen, it is easier to go to terminal and type in the following command:
Code:
xkill
OR
Code:
sudo xkill
After entering any of the above commands, just simply click on the window you wish to kill.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.