3

So i had the bright idea of making a script that pings my IP to see if its up as i am having some issues with it. so here is the script I made.

while : 
do 
      ping (IP address)
done 

now it wont stop, I've tried control x, and z, but it still wont stop? Ive saved it under ~/ .bash_profile, any ideas? //sorry about the space, you know, stack exchange.

3
  • 2
    control-c is the break signal. Otherwise, kill the process id of the script.
    – Paul
    Commented Aug 23, 2015 at 3:38
  • Reboot and login as a different user. If your OS supports it ALT F2 to a second terminal windows. ps -ef |grep <script name> kill -9 <pid of script name>
    – cybernard
    Commented Aug 23, 2015 at 17:01
  • Should note that while the ping is running, i cant type anything, and i am on the defualt mac Os X terminal.
    – toasty
    Commented Aug 23, 2015 at 21:25

2 Answers 2

0

Your can press Ctrl + C to stop things that's "not stopping". On some systems might be Ctrl + Break.

Anyway, sometimes it does not stop immediately, or it won't response to Ctrl + c due to high load of system resources. so you might want to press Ctrl + C many times.

-1

You can use:

ping -c 1 8.8.8.8

1
  • Welcome to Super User! How will that kill the script that's running?
    – bertieb
    Commented Feb 7, 2019 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .