how do I pause execution of the korn shell script ?

I have a Korn shell script and I need to pause it while executing.  Is there any keyword that will allow me to pause execution until I hit a key and then execute the rest of the script??      
rahmanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ahoffmannConnect With a Mentor Commented:
echo -n "hit Return key to continue .."
read q
0
 
rickyrCommented:
type............
jobs
this will return a list of your current running processes.
do..........
fg %1
this will bring process number one to the foreground, now
type control-z this will pause it.
to start it running again do........
bg %1 this will start it off again in the background.
This works the same as the "c" shell.
regards
0
 
rickyrCommented:
Find the process id first.....
ps -ef | grep "process_name"

then, to pause it
kill -STOP process_id

to restart it.
kill -CONT process_id

You have to be root to manipulate processes you don't own.

regards
0
 
rahmanAuthor Commented:
Thanks for all the help guys! :)
0
 
rahmanAuthor Commented:
Thanks for all the help guys! :)
0
All Courses

From novice to tech pro — start learning today.