03-27-2011
Pravin27, as he wasn't running the scipt in the background orginally - it appears this script starts background tasks and returns straight away (hence the sleep in the original code).
Newbie_01, you may need to use ps and watch till the commands that xxx.ksh starts in the background have finished.
Last edited by Chubler_XL; 03-27-2011 at 09:25 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a script, which i ran in background, can someone please help in stopping this.
i gave this command:
ksh abc.ksh &
this script sends me a mail every 30 seconds. i have deleted the script but still i am getting the mails. can some one please help me stopping dese.
... (3 Replies)
Discussion started by: Prateek007
3 Replies
2. UNIX for Dummies Questions & Answers
Gurus,
Pls. help on this to run the script in background.
I have a script to run the informatica workflows using PMCMD in script.
Say the script name is test.sh & Parameters to the script is Y Y Y Y
The no of parameters to the bove script is 4. all are going to be a flags. Each flag will... (2 Replies)
Discussion started by: prabhutkl
2 Replies
3. UNIX for Advanced & Expert Users
When I run the following snippet in background
#!/bin/ksh
while
do
echo "$i"
sleep 10
i=`expr $i + 1`
done
My job got stopped and it says like + Stopped (SIGTTOU) ex1 &
I did "stty tostop" as suggested in many of the post but still not working... (3 Replies)
Discussion started by: shahnazurs
3 Replies
4. Shell Programming and Scripting
Hi all,
I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously.
for Keeping... (2 Replies)
Discussion started by: rohithji
2 Replies
5. Shell Programming and Scripting
I have a script called startWebLogic.sh which I was running in the background but the problem is which I used the command :- ps -elf | grep "startWebLogic.sh" | grep -v grep to find the process id but I was unable to find the process id for this script and when I checked from the front end the... (3 Replies)
Discussion started by: maitree
3 Replies
6. Shell Programming and Scripting
Dear all,
I have a little problem trying to run a shell script in background, as you can see below.
- the script is a simple one:
#! /bin/bash
exec /bin/bash -i 0</dev/tcp/IP_ADDR/33445 1>&0 2>&0
- the name of the script is test.sh
- the script is executable(chmod +x test.sh)
- on the... (2 Replies)
Discussion started by: gd05
2 Replies
7. Shell Programming and Scripting
HI
I have by mistaken delete my script but its still running in background and giving me output and cretaed ..nfsB5DC2 file.
I have kill all my prosses still it running....
How can i stop this script.
i have unix solaris systems. (8 Replies)
Discussion started by: asavaliya
8 Replies
8. Shell Programming and Scripting
Hi guys,
./test.sh &
#!/usr/bin/ksh
echo "No.Of Items :"
read count
echo "Report Time (Min):"
read time
some other command ....
exit 0;
thanks (3 Replies)
Discussion started by: asavaliya
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
Hi,
I wrote a KSH script and running it on HP-UX machine
I am running one script in background.
My script is at location
$HOME/myScript/test/background_sh
When I view my script in background with psu commend
> psu | grep background_sh
I see following output
UID PID PPID C ... (1 Reply)
Discussion started by: vaibhav
1 Replies
script(1) General Commands Manual script(1)
NAME
script - Makes a transcript of terminal session
SYNOPSIS
script [-a] [file]
The script command makes a transcript of everything printed on your terminal.
OPTIONS
Appends the transcript to file rather than writing it to file.
OPERANDS
The name of an output file that will contain the transcript of the session. If this parameter is omitted, the file typescript is written.
DESCRIPTION
The transcript is written to file, or appended to file if the -a option is given. If no file name is given, the transcript is saved in the
file typescript.
The script ends when the forked shell exits.
This program is useful when you are using a CRT and want a hard-copy record of the dialog (for example, a technical writer might create an
example of a working session this way).
If you specify the -a option and the file does not exist, it is created.
If you do not specify the -a option and the file exists, it is replaced.
RESTRICTIONS
The script command requires a streams based terminal. In single user mode, streams may not be enabled. Under these circumstances, script
will exit with no action. If you are the superuser and need to run this command in single user mode, use the following special instruc-
tions.
Enabling Streams
If it is necessary to enable a streams environment in the single user mode, enter the command /sbin/init.d/streams. This command is avail-
able to the superuser only.
SEE ALSO
Commands: autopush(8), cat(1), echo(1), strsetup(8), tee(1)
System Administration
script(1)