Nobody mentioned fg command for taking job to foreground yet!? Summary: Start something in background: ./send-nl.sh & Get job number (1 in this example): jobs Bring job listed as 1 to foreground: fg %1 Kill job 1: kill %1 Yet another way to stop job 1: kill -s 19 %1 Stop any process you own by PID (ps -ef): kill -s 19 PID List all signals one can send to process or job: kill -l
In fact one can add a trap to a script/program which can check for a signal being received and "do" or "stop doing" something in response. Have fun, Tomas On Wed, 2016-10-05 at 14:08 -0700, Rich Shepard wrote: > On Wed, 5 Oct 2016, Dale Snell wrote: > > > You don't need anything so baroque. > > Dave, Michael, Dale: > > Thank you all. Cherry picking from the offered solutions I found > what > works. > > From the directory in which the script started I typed ^z. This > paused the > running script. Then I typed 'bg' and the script re-started in the > background: > > [rshepard@salmo ~]$ ./send-nl.sh > ^Z > [1]+ Stopped ./send-nl.sh > [rshepard@salmo ~]$ bg > [1]+ ./send-nl.sh & > > I thought it was simple, but not having a need to do this before I > wanted > to check with you gurus before trying anything. > > Best regards, > > Rich > > _______________________________________________ > PLUG mailing list > PLUG@lists.pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug