Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Scripting question

Super Advisor

Scripting question

I want to be able to pass a command under "ksh -m". Basically, I want to do this:

ksh -m

continue with process

How can I script this? Thanks.
James R. Ferguson
Acclaimed Contributor

Re: Scripting question

Hi Bobby:

# nohup &

See the man pages for 'nohup' for more information.



Graham Cameron_1
Honored Contributor

Re: Scripting question

You can also use the job control features of the shell. See the "Jobs" section in "man ksh".

Basically you can start up a process from the current shell, eg:

# sleep 3600 # <-- Put your meaningful command here

Then hit ^Z to send a STOP signal to the job, you will see something like:
[1] + Stopped sleep 3600

And if you do a "ps" or a "jobs" command you will see it as stopped.

You can then issue a "bg" command to allow the job to continue in background. You can carry on doing other stuff while it's running.

Note that if a background job requires tty input, it will stop, and you will have to use "fg" to bring it to foreground. A background job can normally write tty output unless you have done a "stty tostop".

Hope this helps, like I said, it's all in the man pages.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Dave Walley
Frequent Advisor

Re: Scripting question

Can you give me some more detail, do you want to run an sql file or what?

why do i do this to myself