Hello, I am trying to run a shell script with the nohup command. The shell script takes an array of files, runs a python program on each file in a loop, and appends the output to a file. This works fine on the server, but if I try to use the nohup command it does not work.
---
---
The program works fine when I run it while staying connected to the server, for example
However, when I try to run it with the nohup command,
if I exit the server and come back the output file (batch_results.dat) does not have any data.
I am sure I am missing some simple fix or command in here. Any ideas?
Last edited by Franklin52; 02-15-2012 at 03:28 AM..
Reason: Please use code tags for code and data samples, thank you
I am running csh. I tried nohup /bin/sh batch.sh & and some other variations and it also did not work.
I have used nohup successfully on these servers working with other programs. I routinely use nohup ./Main.out > /dev/null & and will run programs for days.
I am not sure if my shell script isn't working because I am piping the output of multiple python runs to different things or what.
Dear All,
I have script.
Dest=""
IFS='
'
for translation in $(echo $MY_MAP)
do
t1=$(echo $translation | cut -d"=" -f1)
t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1)
if
then
Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2
break;
... (4 Replies)
Hi. I am trying to start a script on my router that will execute even if i log off. To execute the script I write:
nohup ./dslconnection > dslstat.out 2>&1 &
It starts the job:
21968 admin 1604 S /bin/ash ./dslconnection
The problem is that when I log back in the job has been... (6 Replies)
Hi,
I want to run another script inside shelll script in nohup mode.
let explain.
under the same folder ,I have two scripts
scrone.sh
scrtwo.sh
In scrone.sh
if
then
nohup ./scrtwo.sh &
echo " Script two has been run correctly"
else
echo " Exiting from the script"
fi
If... (3 Replies)
Hi,
i am not able to run the loop in nohup directly.
nohup 'for i in $(seq 10); do echo $i;./mscript.sh $i; done'
can some one help me how to run this directly in nohup?
---------- Post updated 03-15-12 at 12:20 AM ---------- Previous update was 03-14-12 at 11:59 PM ----------
From... (0 Replies)
Hi all,
I wrote a scirpt (abc.sh) in which I defined a loop with an interval equal to 1 hour. I want this script continue to run when I close the terminal, so I ran the following command,
(in the proper directory)
nohup abc.sh
However the script doesn't just keep running when I... (1 Reply)
i want use ssh on the host01 to execute autoexec.sh on the host02 like following :
host01> ssh host02 autoexec.sh
autoexec.sh include nohup command like follwing :
nohup /home/jack/deletedata.sh &
after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Trying to figure out why this works:
printpwd.pl
#!/usr/bin/perl
use CGI::Carp qw( fatalsToBrowser );
print "Content-type: text/html\n\n";
$A = system("pwd");
$A = `pwd`;
print "$A\n";
^^actually that works/breaks if that makes any sense.. i get the working directory twice but when... (5 Replies)
Hello All,
Here is a problem of NOHUP.
I am trying to run a process which needs to be up and running even if the session is closed. I tried running it with "nohup", but starngely it is not working, when i exit from the session the process is also getting killed?
plz help me in finding out... (4 Replies)
Hi,
I am working in SunOS 5.8.
I wanted to run a script in background and I gave the following command, but it is not working.
I gave "nohup ksh ULOAD.ksh &"
It just came out giving a msg "Redirection or piping of stdin or stdout is allowed only with -b. (156)" in nohup.out file.
If I... (2 Replies)