Quantcast
Channel: How to interrupt my script? - Super User
Browsing latest articles
Browse All 3 View Live

Answer by GnP for How to interrupt my script?

Add the following to the end of your script:PID=$!echo $PID > /tmp/wakeupalarm.pidThen your killing script will be #!/bin/bashPidFile=/tmp/wakeupalarm.pid[ -f $PidFile ] && kill $(<...

View Article



Answer by Lawrence for How to interrupt my script?

This should work#!/bin/bashpid=$(ps aux | grep scriptname.sh | awk -F ''' { print $2 } 'kill $pidI'm sure there are better ways though.

View Article

How to interrupt my script?

I use the following script (which I start from at command) as an alarm:#! /bin/shset -mwhile true; do paplay /usr/share/sounds/phone.wavdone &I want to bind a key to stop this alarm. Please help to...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images