06-14-2011
Is it your script or your terminal that's hanging? Open references to the terminal may cause things to hang when you try to quit. What if you run the command with nohup?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a sript which is going to trigger other 3 scripts in background simultaneously
for eg:
Main Script:(main.sh)
-----------
sh a.sh &
sh b.sh &
sh c.sh &
How to catch the exit status and store it in a variable for all those three scripts in main script. Is there any other way of... (4 Replies)
Discussion started by: Omkumar
4 Replies
2. Shell Programming and Scripting
I have a friend at work that asked me a question today and I figured I would seek help here. How does a shell script know whether it is running in the background or not?
Thanks in advance for help (5 Replies)
Discussion started by: Moofasa
5 Replies
3. Shell Programming and Scripting
Hi,
I need to retrieve the exit status of 4 moves running as background processes. The wait command will not work since it can only give me the exit status of the last of the background processes.
Here's a sample of what I need
!#/bin/ksh
mv /dir1/subdir1/*.Z /dir6/subdir6/ &
mv... (2 Replies)
Discussion started by: MG537
2 Replies
4. Shell Programming and Scripting
I have the following sample script to run a script the jobs with the same
priority(in this case field3) in parallel; wait for the jobs to finish
and run the next set of jobs in parallel.When all the lines are read
exit the script.
I have the following script which is doing evrything I want... (1 Reply)
Discussion started by: hyennah
1 Replies
5. Shell Programming and Scripting
Hi All,
I have a scenario where I am executing some child shell scripts in background (using &)through a master parent script.
Is there a way I can capture the exit status of each individual child script after the execution is completed. (2 Replies)
Discussion started by: paragkalra
2 Replies
6. UNIX for Dummies Questions & Answers
My job is launched using this command: I'm at home and having VPN drops so I used nohup and background.
nohup perf_mon -c rating_4_multi,cfg &
The main script is PID 26119, and the sub task under it is 26118 which is not running - just sits there. 26119 runs forever but nothing else runs. I... (2 Replies)
Discussion started by: ido1957
2 Replies
7. Shell Programming and Scripting
Hello Everyody,
Having a doubt.
sort file1 &
when we sent a job to the background it returns
Job Number
PID
again if we want to ... (1 Reply)
Discussion started by: knroy10
1 Replies
8. Shell Programming and Scripting
load_cursor_stmt()
{
ls /db/admin/ddl/rmn01000/load_cursor*.sql|while read file
do
echo "${file}"
`nohup db2 -tvf "$file" \&`
done
}Error:
-------
/admin/ddl/rmn01000/load_cursor5.sql /db/admin/ddl/rmn01000/load_cursor6.sql
+ read file
+ echo... (3 Replies)
Discussion started by: Hangman2
3 Replies
9. Shell Programming and Scripting
Hi,
I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help..
i am using below command to run script
nohup system_traps.sh &
but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies
10. Shell Programming and Scripting
Heyas,
Since this question (similar) occur every now and then, and given the fact i was thinking about it just recently (1-2 weeks) anyway, i started to write something :p
The last point for motivation was... (17 Replies)
Discussion started by: sea
17 Replies
proto(4) Kernel Interfaces Manual proto(4)
NAME
proto - prototype job file for at
SYNOPSIS
DESCRIPTION
When a job is submitted to or the job is constructed as a POSIX shell script (see at(1)). The job file is created in as follows:
o creates a header describing the job as an job or a job. jobs submitted to all queues other than queue are listed as jobs. The header
is:
for an job, or
for a job.
o A set of POSIX shell commands is added to make the environment (see environ(5)) for the job the same as the current environment.
o then copies text from the prototype file to the job file, except for special variables that are replaced by other text:
Replaced by the current working directory.
Replaced by the current file size limit (see
ulimit(2)).
Replaced by the current umask (see
umask(2)).
Replaced by the time at which the job should be run,
expressed as seconds since January 1, 1970, 00:00 Coordinated Universal Time, preceded by a colon.
Replaced by text read by
from the standard input (that is, the commands provided to to be run in the job).
o When a job is submitted to queue queue, uses the file as the prototype file if it exists. Otherwise, it uses the file
EXAMPLES
The following file creates commands to change the current directory, file size limit, and umask in the job to their respective values as
they existed when was originally run. These commands are inserted before the commands in the job:
SEE ALSO
at(1), queuedefs(4).
STANDARDS CONFORMANCE
proto(4)